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 |
---|---|---|---|
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 |