USBUART - IRQ

Dependents:   MPU9250AHRS_UBSUART-IRQ

Fork of MODSERIAL by Andy K

Files at this revision

API Documentation at this revision

Comitter:
banhis
Date:
Fri Dec 11 01:40:22 2015 +0000
Parent:
25:ae0408ebdd68
Commit message:
USBUART - IRQ

Changed in this revision

INIT.cpp Show annotated file Show diff for this revision Revisions of this file
MODSERIAL.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r ae0408ebdd68 -r 954edf3d4ec1 INIT.cpp
--- a/INIT.cpp	Tue Jan 08 18:01:03 2013 +0000
+++ b/INIT.cpp	Fri Dec 11 01:40:22 2015 +0000
@@ -33,19 +33,19 @@
     
     callbackInfo.setSerial(this);
 
-#ifdef __LPC11UXX_H__
-
-    _base = LPC_USART;
-    
-#else    
-    switch( _serial.index ) {
-        case 0: _base = LPC_UART0; break;
-        case 1: _base = LPC_UART1; break;
-        case 2: _base = LPC_UART2; break;
-        case 3: _base = LPC_UART3; break;
-        default: _base = NULL;      break;
-    }
-#endif
+//#ifdef __LPC11UXX_H__
+//
+//    _base = LPC_USART;
+//    
+//#else    
+//    switch( _serial.index ) {
+//        case 0: _base = LPC_UART0; break;
+//        case 1: _base = LPC_UART1; break;
+//        case 2: _base = LPC_UART2; break;
+//        case 3: _base = LPC_UART3; break;
+//        default: _base = NULL;      break;
+//    }
+//#endif
     
     dmaSendChannel  = -1;
     moddma_p        = (void *)NULL;
diff -r ae0408ebdd68 -r 954edf3d4ec1 MODSERIAL.cpp
--- a/MODSERIAL.cpp	Tue Jan 08 18:01:03 2013 +0000
+++ b/MODSERIAL.cpp	Fri Dec 11 01:40:22 2015 +0000
@@ -87,31 +87,31 @@
 MODSERIAL::disableIrq( void )
 {
 
-#ifdef __LPC11UXX_H__
-    NVIC_DisableIRQ( UART_IRQn );
-#else
-    switch( _serial.index ) {
-        case 0:   NVIC_DisableIRQ( UART0_IRQn ); break;
-        case 1:   NVIC_DisableIRQ( UART1_IRQn ); break;
-        case 2:   NVIC_DisableIRQ( UART2_IRQn ); break;
-        case 3:   NVIC_DisableIRQ( UART3_IRQn ); break;
-    }
-#endif
+//#ifdef __LPC11UXX_H__
+//    NVIC_DisableIRQ( UART_IRQn );
+//#else
+//    switch( _serial.index ) {
+//        case 0:   NVIC_DisableIRQ( UART0_IRQn ); break;
+//        case 1:   NVIC_DisableIRQ( UART1_IRQn ); break;
+//        case 2:   NVIC_DisableIRQ( UART2_IRQn ); break;
+//        case 3:   NVIC_DisableIRQ( UART3_IRQn ); break;
+//    }
+//#endif
 }
 
 void
 MODSERIAL::enableIrq(void)
 {
-#ifdef __LPC11UXX_H__
-    NVIC_EnableIRQ( UART_IRQn );
-#else
-    switch( _serial.index ) {
-        case 0:   NVIC_EnableIRQ( UART0_IRQn ); break;
-        case 1:   NVIC_EnableIRQ( UART1_IRQn ); break;
-        case 2:   NVIC_EnableIRQ( UART2_IRQn ); break;
-        case 3:   NVIC_EnableIRQ( UART3_IRQn ); break;
-    }
-#endif
+//#ifdef __LPC11UXX_H__
+//    NVIC_EnableIRQ( UART_IRQn );
+//#else
+//    switch( _serial.index ) {
+//        case 0:   NVIC_EnableIRQ( UART0_IRQn ); break;
+//        case 1:   NVIC_EnableIRQ( UART1_IRQn ); break;
+//        case 2:   NVIC_EnableIRQ( UART2_IRQn ); break;
+//        case 3:   NVIC_EnableIRQ( UART3_IRQn ); break;
+//    }
+//#endif
 }
 
 int