Async I/O with BufferedSerial

So we’ve used UnbufferedSerial for a while and it works fine. However, it would be nice to be able to just throw a buffer of bytes at Mbed and “here, write this and let me know when it’s done”. Basic async stuff. This is all available in SerialBase in the form of the method:

write (const uint8_t *buffer, int length, const event_callback_t &callback, int event=SERIAL_EVENT_TX_COMPLETE) 

But for some weird reason I can’t understand it’s privately inherited into BufferedSerial and thus off limits. Any reason why such useful functionality would be taken away from us poor developers? Setting non blocking mode and manually faffing around with the reading/writing is annoying and prone to bugs.

Or perhaps there’s some other way to do async serial communication that’s not apparent from the docs?

This seems to be related:

But the gist of that seems to be “the serial API:s are badly designed so this can never work”, or am I reading it wrong?


Still open…