Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

support new uart core

  • Loading branch information...
commit 8239be06539722c6ab540ed476b72d2ebe5a1fe7 1 parent ffad713
authored November 22, 2011
6  src/main.c
@@ -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();
11  src/tests_midi.c
@@ -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
 	

0 notes on commit 8239be0

Please sign in to comment.
Something went wrong with that request. Please try again.