An RTOS-friendly Serial interface Its primary benefit is that it never hogs the CPU. An amusing alternative to the traditional ring-bufferd interrupt-serviced systems, it uses short mbed-rtos queues to buffer characters to and from the UART, and a thread to service the transmitter. Short interrupt service routines enqueue received characters and signal the transmit thread when the transmitter is available. WARNING: Do not create RTOS-Serial objects before the RTOS is running! Put them inside your main() block or another function, not in the global initialization.

Dependents:   Test_RDM880_rfid_reader

Revisions of rtos_serial.h

Revision Date Message Actions
19:d974f46f6882 2013-10-30 example needed @endcode File  Diff  Annotate
18:8665cc17b30d 2013-10-30 Provide example of use File  Diff  Annotate
17:93011ddbd0a2 2013-10-30 for publication File  Diff  Annotate
16:2d3937773625 2013-10-30 Apache-2 license File  Diff  Annotate
15:5f38a747ba08 2013-10-30 First publication File  Diff  Annotate
14:33d60e4eb215 2013-10-24 getc(timeout) added File  Diff  Annotate
13:2fb32235253c 2013-10-24 checkpoint tried and failed to make work when pre-allocated File  Diff  Annotate
12:be7883573c91 2013-10-24 checkpoint in bugfix of pre-allocated RTOS_Serial File  Diff  Annotate
11:bc067b42f8e0 2013-10-24 get_baud(), emitter thread stack size File  Diff  Annotate
10:d5adca63e94a 2013-10-23 Adapt to mbed-src as it exists now File  Diff  Annotate
9:b664b4f9f93d 2013-10-22 tx thread required File  Diff  Annotate
8:3644d12758da 2013-10-22 Instance method can be attached as ISR so do that File  Diff  Annotate
7:dd892347b524 2013-10-21 #ifdef underscore_putc, _getc File  Diff  Annotate
6:438a6c0acbd4 2013-10-20 destructor File  Diff  Annotate
5:5d388d1d7987 2013-10-19 uart_number = get_index() File  Diff  Annotate
4:c7113cd0ac4b 2013-10-19 queue-buffered getc() File  Diff  Annotate
2:891773cc33fd 2013-10-18 checkpoint before implementing getc() File  Diff  Annotate
1:5a66fddad7c4 2013-10-18 checkpoint File  Diff  Annotate
0:0547c8bf304f 2013-10-18 checkpoint in draft File  Diff  Annotate