Software Serial lib
Dependents: BufferedSoftSerial
Fork of SoftSerial by
Diff: SoftSerial.cpp
- Revision:
- 9:4e4617c4a441
- Parent:
- 6:517082212c00
diff -r 332b66de89d3 -r 4e4617c4a441 SoftSerial.cpp --- 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; }