Software serial, for when you are out of serial pins

Dependents:   BufferedSoftSerial neurGAI_Seeed_BLUETOOTH LPC-SD-35 ESP-WROOM-02_test ... more

Files at this revision

API Documentation at this revision

Comitter:
Sissors
Date:
Sat Apr 26 20:55:02 2014 +0000
Parent:
4:c010265ed202
Child:
6:517082212c00
Commit message:
Added name option to constructor

Changed in this revision

SoftSerial.cpp Show annotated file Show diff for this revision Revisions of this file
SoftSerial.h Show annotated file Show diff for this revision Revisions of this file
--- a/SoftSerial.cpp	Sat Apr 26 20:04:49 2014 +0000
+++ b/SoftSerial.cpp	Sat Apr 26 20:55:02 2014 +0000
@@ -1,6 +1,6 @@
 #include "SoftSerial.h"
 
-SoftSerial::SoftSerial(PinName TX, PinName RX) {
+SoftSerial::SoftSerial(PinName TX, PinName RX, const char* name) {
     tx_en = rx_en = false;
     if (TX != NC) {
         tx = new DigitalOut(TX);
--- a/SoftSerial.h	Sat Apr 26 20:04:49 2014 +0000
+++ b/SoftSerial.h	Sat Apr 26 20:55:02 2014 +0000
@@ -14,8 +14,9 @@
     *
     * @param TX Name of the TX pin, NC for not connected
     * @param RX Name of the RX pin, NC for not connected, must be capable of being InterruptIn
+    * @param name Name of the connection
     */
-    SoftSerial(PinName TX, PinName RX);
+    SoftSerial(PinName TX, PinName RX, const char* name = NULL);
     
     /** Set the baud rate of the serial port
      *