The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
Diff: platform/FileHandle.h
- Revision:
- 160:5571c4ff569f
- Parent:
- 158:1c57384330a6
- Child:
- 165:d1b4690b3f8b
--- a/platform/FileHandle.h Thu Nov 23 11:44:04 2017 +0000 +++ b/platform/FileHandle.h Wed Jan 17 16:13:02 2018 +0000 @@ -51,7 +51,7 @@ * Devices acting as FileHandles should follow POSIX semantics: * * * if no data is available, and non-blocking set return -EAGAIN - * * if no data is available, and blocking set, wait until data is available + * * if no data is available, and blocking set, wait until some data is available * * If any data is available, call returns immediately * * @param buffer The buffer to read in to @@ -62,6 +62,12 @@ /** Write the contents of a buffer to a file * + * Devices acting as FileHandles should follow POSIX semantics: + * + * * if blocking, block until all data is written + * * if no data can be written, and non-blocking set, return -EAGAIN + * * if some data can be written, and non-blocking set, write partial + * * @param buffer The buffer to write from * @param size The number of bytes to write * @return The number of bytes written, negative error on failure