Introducing a BufferedSerial
BufferedSerial is a FileHandle and using SerialBase. It keeps the SerialBase private however lets the user extend FileHandle by keeping it public. It is using CircularBuffer class for having circular buffers. There are some minor amendments in CircularBuffer too. Adding an entry for tx/rx buffer sizes in platform/mbed_lib.json. Default size is 256 bytes. For RTOS read(), write() calls yield for other threads to carry on with their stuff. For non-RTOS blovking read or write would mean a loop where 100 percent resources are consumed by this loop. Need to get a better implementation in. Currently no mechanism to wake the mcu up after WFE. |
---|
|
platform/BufferedSerial.cpp 0 → 100644 |
---|
platform/BufferedSerial.h 0 → 100644 |
---|
platform/CircularBuffer.h |
---|
platform/mbed_lib.json |
---|