MODSERIAL with support for KL25Z + RTOS (beta, putc + puts currently)

Dependents:   kl25z_USB_4

Fork of MODSERIAL by Erik -

Files at this revision

API Documentation at this revision

Comitter:
AjK
Date:
Tue Jan 08 18:01:03 2013 +0000
Parent:
24:9c456e647a8f
Child:
26:91e4dba7ebe2
Commit message:
See ChangeLog.c

Changed in this revision

ChangeLog.c Show annotated file Show diff for this revision Revisions of this file
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
MODSERIAL.h Show annotated file Show diff for this revision Revisions of this file
--- a/ChangeLog.c	Thu Dec 06 13:06:10 2012 +0000
+++ b/ChangeLog.c	Tue Jan 08 18:01:03 2013 +0000
@@ -1,7 +1,16 @@
 /* $Id:$
 
+1.25    8th January 2013
+    
+    * Bring back into line with MBed libraries.
+    * Credits: 
+        Erik Olieman : http://mbed.org/users/Sissors/code/MODSERIAL/rev/3ba4341d74d6
+        Erik Olieman : http://mbed.org/users/Sissors/code/MODSERIAL/rev/a469aa702bab
+    
+
 1.24    6th Dec 2012
-        Beta release for new Mbed library.
+        
+    * Beta release for new Mbed library.
 
 1.23    25th July 2012
 
@@ -11,7 +20,7 @@
 
     * http://mbed.org/forum/bugs-suggestions/topic/2936/
     * Bug fix, protect important buffer pointers from IRQ corruption.
-      Credits: 
+    * Credits: 
         Anthony Wieser  http://mbed.org/users/WieserSoftwareLtd/ for the fix.
         BlazeX http://mbed.org/users/BlazeX/ for the alert that a fix was needed!
 
--- a/INIT.cpp	Thu Dec 06 13:06:10 2012 +0000
+++ b/INIT.cpp	Tue Jan 08 18:01:03 2013 +0000
@@ -57,7 +57,7 @@
         buffer_out[RxIrq]      = 0;
         buffer_count[RxIrq]    = 0;
         buffer_overflow[RxIrq] = 0;
-        Serial::attach( this, &MODSERIAL::isr_rx, (SerialIrq)0 );        
+        Serial::attach( this, &MODSERIAL::isr_rx, Serial::RxIrq );        
         
         buffer_size[TxIrq]     = txSize;
         buffer[TxIrq]          = txSize > 0 ? (char *)malloc(buffer_size[TxIrq]) : (char *)NULL;
@@ -65,7 +65,7 @@
         buffer_out[TxIrq]      = 0;
         buffer_count[TxIrq]    = 0;
         buffer_overflow[TxIrq] = 0;
-        Serial::attach( this, &MODSERIAL::isr_tx, (SerialIrq)1 );
+        Serial::attach( this, &MODSERIAL::isr_tx, Serial::TxIrq );
     }
     else {
         error("MODSERIAL must have a defined UART to function.");
--- a/MODSERIAL.cpp	Thu Dec 06 13:06:10 2012 +0000
+++ b/MODSERIAL.cpp	Tue Jan 08 18:01:03 2013 +0000
@@ -31,17 +31,17 @@
 
 namespace AjK {
 
-MODSERIAL::MODSERIAL( PinName tx, PinName rx ) : Serial( tx, rx )
+MODSERIAL::MODSERIAL( PinName tx, PinName rx, const char* name ) : Serial( tx, rx, name )
 {
     init( MODSERIAL_DEFAULT_TX_BUFFER_SIZE, MODSERIAL_DEFAULT_RX_BUFFER_SIZE, rx );
 }
 
-MODSERIAL::MODSERIAL( PinName tx, PinName rx, int bufferSize ) : Serial( tx, rx )
+MODSERIAL::MODSERIAL( PinName tx, PinName rx, int bufferSize, const char* name ) : Serial( tx, rx, name )
 {
     init( bufferSize, bufferSize, rx );
 }
 
-MODSERIAL::MODSERIAL( PinName tx, PinName rx, int txSize, int rxSize ) : Serial( tx, rx )
+MODSERIAL::MODSERIAL( PinName tx, PinName rx, int txSize, int rxSize, const char* name ) : Serial( tx, rx, name )
 {
     init( txSize, rxSize, rx );
 }
--- a/MODSERIAL.h	Thu Dec 06 13:06:10 2012 +0000
+++ b/MODSERIAL.h	Tue Jan 08 18:01:03 2013 +0000
@@ -284,7 +284,7 @@
      * @param tx PinName of the TX pin.
      * @param rx PinName of the TX pin.
      */    
-    MODSERIAL(PinName tx, PinName rx);
+    MODSERIAL(PinName tx, PinName rx, const char* name = NULL);
     
     /**
      * The MODSERIAL constructor is used to initialise the serial object.
@@ -293,7 +293,7 @@
      * @param rx PinName of the TX pin.
      * @param bufferSize Integer of the TX and RX buffer sizes.
      */    
-    MODSERIAL(PinName tx, PinName rx, int bufferSize);
+    MODSERIAL(PinName tx, PinName rx, int bufferSize, const char* name = NULL);
     
     /**
      * The MODSERIAL constructor is used to initialise the serial object.
@@ -303,7 +303,7 @@
      * @param txBufferSize Integer of the TX buffer sizes.
      * @param rxBufferSize Integer of the RX buffer sizes.
      */    
-    MODSERIAL(PinName tx, PinName rx, int txBufferSize, int rxBufferSize);
+    MODSERIAL(PinName tx, PinName rx, int txBufferSize, int rxBufferSize, const char* name = NULL);
     
     virtual ~MODSERIAL();