Fork of the original SoftSerial library with just a little modification in order to compile it with the current mbed version.

Dependents:   Adafruit_FONA_Library_FONAtest

Fork of SoftSerial by Erik -

Files at this revision

API Documentation at this revision

Comitter:
Sissors
Date:
Sat Jul 05 08:07:49 2014 +0000
Parent:
8:332b66de89d3
Child:
10:236fce2e5b8c
Commit message:
Added destructor

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	Sun Apr 27 19:48:40 2014 +0000
+++ b/SoftSerial.cpp	Sat Jul 05 08:07:49 2014 +0000
@@ -21,6 +21,13 @@
     format();
 }
 
+SoftSerial::~SoftSerial() {
+    if (tx_en)
+        delete(tx);
+    if (rx_en)
+        delete(rx);
+}
+
 void SoftSerial::baud(int baudrate) {
     bit_period = 1000000 / baudrate;
 }
--- a/SoftSerial.h	Sun Apr 27 19:48:40 2014 +0000
+++ b/SoftSerial.h	Sat Jul 05 08:07:49 2014 +0000
@@ -17,6 +17,7 @@
     * @param name Name of the connection
     */
     SoftSerial(PinName TX, PinName RX, const char* name = NULL);
+    virtual ~SoftSerial();
     
     /** Set the baud rate of the serial port
      *