Stream class should use mbed::fdopen() to attach a stream
mbed::fdopen() is provided in mbed_retarget.cpp which will attach a stream to the
given FileHandle. Removing mbed_set_unbuffered_stream() from stream class as it
is defined in mbed_retarget.cpp. Stream class should not decide whether it wants
to detach buffers from c library or not. mbed::fdopen() will do that based upon
isatty() call. So if a FileHandle is not a tty, i.e., is not a device type, c library
buffering will not be turned off. For device type FileHandles, c library buffering
is turned off.
ls
1 parent b2408d8 commit 09ae609d5612d6e7dda49063f119bd89f9932a7e
@Hasnain Virk Hasnain Virk authored on 15 Feb 2017
Showing 4 changed files
View
drivers/RawSerial.cpp
View
drivers/SerialBase.h
View
platform/Stream.cpp
View
platform/Stream.h