Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
Diff: platform/FileHandle.h
- Revision:
- 180:96ed750bd169
- Parent:
- 178:79309dc6340a
--- a/platform/FileHandle.h Thu Dec 07 14:01:42 2017 +0000 +++ b/platform/FileHandle.h Wed Jan 17 15:23:54 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