mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Revision:
186:707f6e361f3e
Parent:
184:08ed48f1de7f
Child:
187:0387e8f68319
--- a/platform/FileHandle.h	Thu Apr 19 17:12:19 2018 +0100
+++ b/platform/FileHandle.h	Fri Jun 22 16:45:37 2018 +0100
@@ -146,6 +146,8 @@
      *  @returns
      *    new file position on success,
      *    -1 on failure or unsupported
+     *  @deprecated Replaced by `off_t FileHandle::seek(off_t offset, int whence = SEEK_SET)'
+     *
      */
     MBED_DEPRECATED_SINCE("mbed-os-5.4", "Replaced by FileHandle::seek")
     virtual off_t lseek(off_t offset, int whence)
@@ -159,6 +161,7 @@
      *  @returns
      *    0 on success or un-needed,
      *   -1 on error
+     *  @deprecated Replaced by `int FileHandle::sync()'
      */
     MBED_DEPRECATED_SINCE("mbed-os-5.4", "Replaced by FileHandle::sync")
     virtual int fsync()
@@ -170,6 +173,7 @@
      *
      *  @returns
      *   Length of the file
+     *  @deprecated Replaced by `off_t FileHandle::size()'
      */
     MBED_DEPRECATED_SINCE("mbed-os-5.4", "Replaced by FileHandle::size")
     virtual off_t flen()
@@ -188,7 +192,16 @@
      */
     virtual int set_blocking(bool blocking)
     {
-        return -1;
+        return blocking ? 0 : -ENOTTY;
+    }
+
+    /** Check current blocking or non-blocking mode for file operations.
+     *
+     *  @return             true for blocking mode, false for non-blocking mode.
+     */
+    virtual bool is_blocking() const
+    {
+        return true;
     }
 
     /** Check for poll event flags