MODSERIAL with support for more devices

Dependents:   1D-Pong BMT-K9_encoder BMT-K9-Regelaar programma_filter ... more

Check the cookbook page for more information: https://mbed.org/cookbook/MODSERIAL

Did you add a device? Please send a pull request so we can keep everything in one library instead of many copies. In that case also send a PM, since currently mbed does not inform of new pull requests. I will then also add you to the developers of this library so you can do other changes directly.

Revision:
24:9c456e647a8f
Parent:
21:af2af4c61c2f
Child:
25:ae0408ebdd68
--- a/MODSERIAL.h	Wed Jul 25 22:27:49 2012 +0000
+++ b/MODSERIAL.h	Thu Dec 06 13:06:10 2012 +0000
@@ -42,6 +42,7 @@
 #endif
 
 #include "mbed.h"
+#include "serial_api.h"
 
 namespace AjK {
 
@@ -282,9 +283,8 @@
      *
      * @param tx PinName of the TX pin.
      * @param rx PinName of the TX pin.
-     * @param name An option name for RPC usage.
      */    
-    MODSERIAL(PinName tx, PinName rx, const char *name = NULL);
+    MODSERIAL(PinName tx, PinName rx);
     
     /**
      * The MODSERIAL constructor is used to initialise the serial object.
@@ -292,9 +292,8 @@
      * @param tx PinName of the TX pin.
      * @param rx PinName of the TX pin.
      * @param bufferSize Integer of the TX and RX buffer sizes.
-     * @param name An option name for RPC usage.
      */    
-    MODSERIAL(PinName tx, PinName rx, int bufferSize, const char *name = NULL);
+    MODSERIAL(PinName tx, PinName rx, int bufferSize);
     
     /**
      * The MODSERIAL constructor is used to initialise the serial object.
@@ -303,9 +302,8 @@
      * @param rx PinName of the TX pin.
      * @param txBufferSize Integer of the TX buffer sizes.
      * @param rxBufferSize Integer of the RX buffer sizes.
-     * @param name An option name for RPC usage.
      */    
-    MODSERIAL(PinName tx, PinName rx, int txBufferSize, int rxBufferSize, const char *name = NULL);
+    MODSERIAL(PinName tx, PinName rx, int txBufferSize, int rxBufferSize);
     
     virtual ~MODSERIAL();
 
@@ -934,7 +932,7 @@
      * Initialize the MODSERIAL object
      * @ingroup INTERNALS
      */
-    void init(int txSize, int rxSize);
+    void init(int txSize, int rxSize, PinName rx);
     
     /** 
      * Function: flushBuffer