Inherit from Serial and use software buffers for TX and RX. This allows the UART peripherals to operate in a IRQ driven mode. Overrides most (but not all) stdio functions as Serial did

Dependencies:   Buffer

Dependents:   LoRaWAN-demo-72-bootcamp

Fork of BufferedSerial by Sam Grove

Changes

RevisionDateWhoCommit message
13:006e7d23b08a 2017-01-28 abouillot Change to callback cast to comply with new mbed version prototypes default tip
12:a0d37088b405 2016-03-07 sam_grove Update Buffer to MyBuffer
11:779304f9c5d2 2015-07-26 sam_grove Force use of RawSerial
10:9ee15ae3d1a3 2015-01-07 ansond updates to the constructor to enable expansion of the internal ring buffers and printf() buffer sizes
9:2cb30392ade6 2015-01-04 ansond updates to buffer ring sizes now 2x the buffer size
8:506247a040bc 2015-01-04 ansond increased buffer sizes more
7:6fa214b41d73 2015-01-02 ansond made updates to enable the ability to expand the internal buffer. Additionally, used the definition to set the size of the ring buffers in the constructor initializer list. Increased the default buffer size to 512. Additional clean ups (param cks)
6:8287e83943f0 2014-09-09 ansond added #define to change the base Serial class to RawSerial if desired
5:4d6a311fc8bf 2014-03-24 sam_grove Updated example in documentation. Tested with mbed.bld 81 and works with LPC1768, LPC11U24, KL25Z, KL46Z, KL05Z
4:2ba4d2e1f05d 2013-12-30 sam_grove Disable TX IRQ when nothing is left in the buffer (FRDM support). Tested example program with KL46Z, KL25Z and LPC11U24. LPC1768 doesn't work. Need to investigate.
3:6b76fcf27545 2013-06-12 sam_grove Updates to block only tx irq when fifo needs a kick. Updated comments and documentation
2:7e8a450a9101 2013-05-24 sam_grove Override virtual member write. Better management of prime to avoid contentious writes under heavy traffic. updated puts to add \n per stdlib puts definition
1:57a11fb5d529 2013-05-23 sam_grove Added prime (private member).Only want to pull from the buffer and write in one spot. prime stops irq's and call the member txIrq to put the oldest buffered byte in the transmitter. IRQ will pull the rest out once enabled again.
0:a977d0a3d81e 2013-05-23 sam_grove TX and RX peripheral functions are IRQ driven. Most stdlib functions are overridden for transmit. Not so much for reading. getc is implemented but not the more formatted scanf.