This is the SerialBuffered class, which wraps Serial and adds interrupt-powered buffered reading (so it will catch inbound data even when your app is busy doing something else) and simple read timeouts. There's a tiny demo app in there too.

Dependencies:   mbed

Auto generated API documentation and code listings for SerialBufferedDemo

Code

main.cpp [code]
SerialBuffered.cpp [code]
SerialBuffered.h [code]