Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TestVirtualisation Bf_SoftSerial_IR
Diff: SoftSerial_rx.cpp
- Revision:
- 6:517082212c00
- Parent:
- 4:c010265ed202
- Child:
- 10:236fce2e5b8c
--- 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