fatfs v0.15 November 6, 2022:
- Changed user provided synchronization functions in order to completely eliminate the platform dependency from FatFs code. - FF_SYNC_t is removed from the configuration options. - Fixed a potential error in f_mount when FF_FS_REENTRANT. - Fixed file lock control FF_FS_LOCK is not mutal excluded when FF_FS_REENTRANT && FF_VOLUMES > 1 is true. - Fixed f_mkfs() creates broken exFAT volume when the size of volume is >= 2^32 sectors. - Fixed string functions cannot write the unicode characters not in BMP when FF_LFN_UNICODE == 2 (UTF-8). - Fixed a compatibility issue in identification of GPT header.
This commit is contained in:
1 parent
87c4907172
commit
ba3f5b7f87
33 files changed
+1285
-899
No files matched your search
@@ -86,7 +86,7 @@ Mode flags in POSIX fopen() function corresponds to FatFs mode flags as follows:
|
||||
|
||||
<div class="para desc">
|
||||
<h4>Description</h4>
|
||||
<p>The <tt>f_open</tt> function opens a file and creates a <em>file object</em>. The file object is used for subsequent read/write operations to the file to identify the file. Open file should be closed with <a href="close.html"><tt>f_close</tt></a> function after the session of the file access. If any change to the file is made and not closed prior to power down, media removal or re-mount, or the file can be collapsed.</p>
|
||||
<p>The <tt>f_open</tt> function opens a file and creates a <em>file object</em>. The file object is an identifier for subsequent operations to the file. Open file should be closed with <a href="close.html"><tt>f_close</tt></a> function after the session of the file access. If any change to the file has been made and not closed prior to power off, media removal or re-mount, or the file can be collapsed.</p>
|
||||
<p>If duplicated file open is needed, read <a href="appnote.html#dup">here</a> carefully. However duplicated open of a file with any write mode flag is always prohibited.</p>
|
||||
</div>
|
||||
|
||||
@@ -111,7 +111,7 @@ int main (void)
|
||||
FRESULT fr; <span class="c">/* FatFs return code */</span>
|
||||
|
||||
|
||||
<span class="c">/* Gives a work area to the default drive */</span>
|
||||
<span class="c">/* Give a work area to the default drive */</span>
|
||||
f_mount(&FatFs, "", 0);
|
||||
|
||||
<span class="c">/* Open a text file */</span>
|
||||
@@ -141,7 +141,7 @@ int main (void)
|
||||
UINT br, bw; <span class="c">/* File read/write count */</span>
|
||||
|
||||
|
||||
<span class="c">/* Gives work area to each logical drive */</span>
|
||||
<span class="c">/* Give work areas to each logical drive */</span>
|
||||
f_mount(&fs0, "0:", 0);
|
||||
f_mount(&fs1, "1:", 0);
|
||||
|
||||
@@ -155,9 +155,9 @@ int main (void)
|
||||
|
||||
<span class="c">/* Copy source to destination */</span>
|
||||
for (;;) {
|
||||
f_read(&fsrc, buffer, sizeof buffer, &br); <span class="c">/* Read a chunk of data from the source file */</span>
|
||||
fr = f_read(&fsrc, buffer, sizeof buffer, &br); <span class="c">/* Read a chunk of data from the source file */</span>
|
||||
if (br == 0) break; <span class="c">/* error or eof */</span>
|
||||
f_write(&fdst, buffer, br, &bw); <span class="c">/* Write it to the destination file */</span>
|
||||
fr = f_write(&fdst, buffer, br, &bw); <span class="c">/* Write it to the destination file */</span>
|
||||
if (bw < br) break; <span class="c">/* error or disk full */</span>
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user