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
Diff: SoftSerial_rx.cpp
- Revision:
- 6:517082212c00
- Parent:
- 4:c010265ed202
- Child:
- 10:236fce2e5b8c
diff -r acfd0329f648 -r 517082212c00 SoftSerial_rx.cpp --- a/SoftSerial_rx.cpp Sat Apr 26 20:55:02 2014 +0000 +++ b/SoftSerial_rx.cpp Sun Apr 27 08:33:17 2014 +0000 @@ -12,16 +12,15 @@ //Start receiving byte void SoftSerial::rx_gpio_irq_handler(void) { - rxout.attach_us(this, &SoftSerial::rx_handler, bit_period + (bit_period >> 1)); //Start reading first data byte + rxticker.prime(); + rxticker.setNext(bit_period + (bit_period >> 1)); rx->fall(NULL); rx_bit = 0; rx_error = false; }; void SoftSerial::rx_handler(void) { - if (!rx_bit) - rxticker.attach_us(this, &SoftSerial::rx_handler, bit_period); - + rxticker.setNext(bit_period); rx_bit++; //Receive data