MODSERIAL with support for more devices

Fork of MODSERIAL by Erik -

Files at this revision

API Documentation at this revision

Comitter:
Sissors
Date:
Sun May 07 16:26:36 2017 +0000
Parent:
43:8c8d13e1840b
Child:
45:da0788f0bd77
Commit message:
Used callback functions to attach to Serial, to remove compilation warnings

Changed in this revision

INIT.cpp Show annotated file Show diff for this revision Revisions of this file
MODSERIAL.h Show annotated file Show diff for this revision Revisions of this file
--- a/INIT.cpp	Wed Apr 26 06:50:40 2017 +0000
+++ b/INIT.cpp	Sun May 07 16:26:36 2017 +0000
@@ -50,7 +50,7 @@
         buffer_out[RxIrq]      = 0;
         buffer_count[RxIrq]    = 0;
         buffer_overflow[RxIrq] = 0;
-        Serial::attach( this, &MODSERIAL::isr_rx, Serial::RxIrq );        
+        Serial::attach( callback(this, &MODSERIAL::isr_rx), Serial::RxIrq );        
         
         buffer_size[TxIrq]     = txSize;
         buffer[TxIrq]          = txSize > 0 ? (char *)malloc(buffer_size[TxIrq]) : (char *)NULL;
@@ -58,7 +58,7 @@
         buffer_out[TxIrq]      = 0;
         buffer_count[TxIrq]    = 0;
         buffer_overflow[TxIrq] = 0;
-        Serial::attach( this, &MODSERIAL::isr_tx, Serial::TxIrq );
+        Serial::attach( callback(this, &MODSERIAL::isr_tx_true), Serial::TxIrq );
     }
     else {
         error("MODSERIAL must have a defined UART to function.");
--- a/MODSERIAL.h	Wed Apr 26 06:50:40 2017 +0000
+++ b/MODSERIAL.h	Sun May 07 16:26:36 2017 +0000
@@ -894,7 +894,7 @@
      * TX Interrupt Service Routine stub version.
      * @ingroup INTERNALS
      */ 
-    void isr_tx(void) { isr_tx(true); }
+    void isr_tx_true(void) { isr_tx(true); }
     
     
     /**