File tree 2 files changed +8
-9
lines changed
2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,8 @@ void isr()
29
29
30
30
irqs = irq_pending () & irq_getmask ();
31
31
32
- if (irqs & IRQ_UARTRX )
33
- uart_isr_rx ();
34
- if (irqs & IRQ_UARTTX )
35
- uart_isr_tx ();
32
+ if (irqs & IRQ_UART )
33
+ uart_isr ();
36
34
37
35
if (irqs & IRQ_USB )
38
36
usb_isr ();
Original file line number Diff line number Diff line change @@ -29,22 +29,23 @@ static int loopback()
29
29
int result = TEST_STATUS_PASSED ;
30
30
31
31
printf ("press 'e' exit MIDI test\n" );
32
- irq_ack (IRQ_MIDITX | IRQ_MIDIRX );
32
+ irq_ack (IRQ_MIDI );
33
33
while (1 ) {
34
34
if (c == 256 ) {
35
35
printf ("0 ~ 255 sent out, press 'e' for exit\n" );
36
36
c = 0 ;
37
37
}
38
38
CSR_MIDI_RXTX = c ;
39
- while (!(irq_pending () & IRQ_MIDITX )) {
39
+ while (!(CSR_MIDI_STAT & MIDI_STAT_TX_EVT )) {
40
40
if (readchar_nonblock ()) {
41
41
e = readchar ();
42
42
if (e == 'e' ) return result ;
43
43
}
44
44
}
45
- irq_ack ( IRQ_MIDITX ) ;
45
+ CSR_MIDI_STAT = MIDI_STAT_TX_EVT ;
46
46
47
- if (!(irq_pending () & IRQ_MIDIRX )) {
47
+
48
+ if (CSR_MIDI_STAT & MIDI_STAT_RX_EVT ) {
48
49
printf ("Failed: RX receive problem\n" );
49
50
result = TEST_STATUS_FAILED ;
50
51
}
@@ -53,7 +54,7 @@ static int loopback()
53
54
printf ("Failed: TX: %d, but RX: %d\n" , c , CSR_MIDI_RXTX );
54
55
result = TEST_STATUS_FAILED ;
55
56
}
56
- irq_ack ( IRQ_MIDIRX ) ;
57
+ CSR_MIDI_STAT = MIDI_STAT_RX_EVT ;
57
58
c ++ ;
58
59
}
59
60
You can’t perform that action at this time.
0 commit comments