Better Serial C class library with interrupt

Dependencies:   RingBuffer

Fork of iSerial by Yoji KURODA

Files at this revision

API Documentation at this revision

Comitter:
gorian
Date:
Fri Jul 10 21:01:20 2015 +0000
Parent:
8:20759f992d48
Commit message:
???

Changed in this revision

iSerial.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 20759f992d48 -r 73e615c2b233 iSerial.cpp
--- a/iSerial.cpp	Mon Sep 03 17:59:00 2012 +0000
+++ b/iSerial.cpp	Fri Jul 10 21:01:20 2015 +0000
@@ -17,7 +17,7 @@
 iSerial::enable_uart_irq(void)
 {
     switch(tx){
-    case USBTX:
+    case PA_9:
         #if defined(TARGET_LPC1768)
             NVIC_EnableIRQ(UART2_IRQn);
         #elif defined(TARGET_LPC11U24)
@@ -26,22 +26,6 @@
 //        led1 = !led1;
         break;
         
-    case p9:
-        #if defined(TARGET_LPC1768)
-            NVIC_EnableIRQ(UART1_IRQn);
-        #elif defined(TARGET_LPC11U24)
-            NVIC_EnableIRQ(UART_IRQn);
-        #endif
-        break;
-
-    #if defined(TARGET_LPC1768)
-    case p13:
-        NVIC_EnableIRQ(UART3_IRQn);
-        break;
-    case p28:
-        NVIC_EnableIRQ(UART0_IRQn);
-        break;
-    #endif
     }
 }
 
@@ -49,7 +33,7 @@
 iSerial::disable_uart_irq(void)
 {
     switch(tx){
-    case USBTX:
+    case PA_9:
         #if defined(TARGET_LPC1768)
             NVIC_DisableIRQ(UART2_IRQn);
         #elif defined(TARGET_LPC11U24)
@@ -57,23 +41,6 @@
         #endif
 //        led1 = !led1;
         break;
-        
-    case p9:
-        #if defined(TARGET_LPC1768)
-            NVIC_DisableIRQ(UART1_IRQn);
-        #elif defined(TARGET_LPC11U24)
-            NVIC_DisableIRQ(UART_IRQn);
-        #endif
-        break;
-
-    #if defined(TARGET_LPC1768)
-    case p13:
-        NVIC_DisableIRQ(UART3_IRQn);
-        break;
-    case p28:
-        NVIC_DisableIRQ(UART0_IRQn);
-        break;
-    #endif
     }
 }