TheRobotStudio ROSA / MODSERIAL

Dependents:   trs_master

Fork of MODSERIAL by Erik -

Files at this revision

API Documentation at this revision

Comitter:
Sissors
Date:
Thu Nov 22 10:43:21 2012 +0000
Parent:
24:fca9bb26ca15
Child:
26:eb79370d38a2
Commit message:
Changed interrupt code (still doesnt work though, probably due to Serial interrupt not working)

Changed in this revision

INIT.cpp Show annotated file Show diff for this revision Revisions of this file
example2.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/INIT.cpp	Thu Nov 22 09:38:19 2012 +0000
+++ b/INIT.cpp	Thu Nov 22 10:43:21 2012 +0000
@@ -58,7 +58,7 @@
         buffer_out[RxIrq]      = 0;
         buffer_count[RxIrq]    = 0;
         buffer_overflow[RxIrq] = 0;
-        Serial::attach(this, &MODSERIAL::isr_rx, (SerialIrq)RxIrq);        
+        Serial::attach(this, &MODSERIAL::isr_rx, (SerialIrq)1);        
         
         buffer_size[TxIrq]     = txSize;
         buffer[TxIrq]          = txSize > 0 ? (char *)malloc(buffer_size[TxIrq]) : (char *)NULL;
@@ -66,7 +66,7 @@
         buffer_out[TxIrq]      = 0;
         buffer_count[TxIrq]    = 0;
         buffer_overflow[TxIrq] = 0;
-        Serial::attach(this, &MODSERIAL::isr_tx, (SerialIrq)TxIrq);
+        Serial::attach(this, &MODSERIAL::isr_tx, (SerialIrq)(0));
     }
     else {
         error("MODSERIAL must have a defined UART to function.");
--- a/example2.cpp	Thu Nov 22 09:38:19 2012 +0000
+++ b/example2.cpp	Thu Nov 22 10:43:21 2012 +0000
@@ -76,7 +76,7 @@
 */
 
 
-#ifdef COMPILE_EXAMPLE1_CODE_MODSERIAL
+#ifdef COMPILE_EXAMPLE2_CODE_MODSERIAL
 
 #include "mbed.h"
 #include "MODSERIAL.h"