Software serial, for when you are out of serial pins
Dependents: BufferedSoftSerial neurGAI_Seeed_BLUETOOTH LPC-SD-35 ESP-WROOM-02_test ... more
Diff: SoftSerial.cpp
- Revision:
- 6:517082212c00
- Parent:
- 5:acfd0329f648
- Child:
- 9:4e4617c4a441
--- a/SoftSerial.cpp Sat Apr 26 20:55:02 2014 +0000 +++ b/SoftSerial.cpp Sun Apr 27 08:33:17 2014 +0000 @@ -7,11 +7,13 @@ tx_en = true; tx->write(1); tx_bit = -1; + txticker.attach(this, &SoftSerial::tx_handler); } if (RX != NC) { rx = new InterruptIn(RX); rx_en = true; out_valid = false; + rxticker.attach(this, &SoftSerial::rx_handler); rx->fall(this, &SoftSerial::rx_gpio_irq_handler); }