From 5366852335044c1e68a5c32548d3051cc943552f Mon Sep 17 00:00:00 2001 From: Leo C Date: Tue, 19 Aug 2014 15:31:33 +0200 Subject: Import fatfs R0.10b FatFs Module Source Files R0.10b Author: (C)ChaN, 2014 (http://elm-chan.org) URL: http://elm-chan.org/fsw/ff/ff10b.zip --- fatfs/doc/en/sync.html | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 fatfs/doc/en/sync.html (limited to 'fatfs/doc/en/sync.html') diff --git a/fatfs/doc/en/sync.html b/fatfs/doc/en/sync.html new file mode 100644 index 0000000..3e86b7f --- /dev/null +++ b/fatfs/doc/en/sync.html @@ -0,0 +1,66 @@ + + +
+ + + + + +The f_sync function flushes the cached information of a writing file.
++FRESULT f_sync ( + FIL* fp /* [IN] File object */ +); ++
+FR_OK, +FR_DISK_ERR, +FR_INT_ERR, +FR_NOT_READY, +FR_INVALID_OBJECT, +FR_TIMEOUT +
+The f_sync() function performs the same process as f_close() function but the file is left opened and can continue read/write/seek operations to the file. This is suitable for the applications that open files for a long time in write mode, such as data logger. Performing f_sync() function of periodic or immediataly after f_write() function can minimize the risk of data loss due to a sudden blackout or an unintentional media removal. For more information, refer to application note.
+However there is no sense in f_sync() function immediataly before f_close() function because it performs f_sync() function in it. In other words, the differnce between those functions is that the file object is invalidated or not.
+Available when _FS_READONLY == 0.
+