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.
ls
1 parent 09ae609 commit 2790d448628b34cf6beac02f199cab5a0741fee4
@Hasnain Virk Hasnain Virk authored on 15 Feb 2017
Showing 4 changed files
View
platform/BufferedSerial.cpp 0 → 100644
View
platform/BufferedSerial.h 0 → 100644
View
platform/CircularBuffer.h
View
platform/mbed_lib.json