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

Revision:
3:5865277b7710
Parent:
2:891773cc33fd
Child:
4:c7113cd0ac4b
--- a/rtos_serial.cpp	Fri Oct 18 06:04:55 2013 +0000
+++ b/rtos_serial.cpp	Fri Oct 18 23:22:49 2013 +0000
@@ -157,4 +157,4 @@
         }
         *(sp->ledp) = 0;
     }
-}
\ No newline at end of file
+}