fatfs v0.13c October 14, 2018:
- Supported stdint.h for C99 and later. (integer.h was included in ff.h) - Fixed reading a directory gets infinite loop when the last directory entry is not empty. (appeared at R0.12) - Fixed creating a sub-directory in the fragmented sub-directory on the exFAT volume collapses FAT chain of the parent directory. (appeared at R0.12) - Fixed f_getcwd() cause output buffer overrun when the buffer has a valid drive number. (appeared at R0.13b)
This commit is contained in:
1 parent
7b4dceffab
commit
7cb0c2d1e6
29 files changed
+369
-263
No files matched your search
@@ -118,7 +118,7 @@ int main (void)
|
||||
fr = <em>f_open</em>(&fil, "message.txt", FA_READ);
|
||||
if (fr) return (int)fr;
|
||||
|
||||
<span class="c">/* Read all lines and display it */</span>
|
||||
<span class="c">/* Read every line and display it */</span>
|
||||
while (f_gets(line, sizeof line, &fil)) {
|
||||
printf(line);
|
||||
}
|
||||
@@ -134,7 +134,7 @@ int main (void)
|
||||
|
||||
int main (void)
|
||||
{
|
||||
FATFS fs[2]; <span class="c">/* Work area (filesystem object) for logical drives */</span>
|
||||
FATFS fs0, fs1; <span class="c">/* Work area (filesystem object) for logical drives */</span>
|
||||
FIL fsrc, fdst; <span class="c">/* File objects */</span>
|
||||
BYTE buffer[4096]; <span class="c">/* File copy buffer */</span>
|
||||
FRESULT fr; <span class="c">/* FatFs function common result code */</span>
|
||||
@@ -142,8 +142,8 @@ int main (void)
|
||||
|
||||
|
||||
<span class="c">/* Register work area for each logical drive */</span>
|
||||
f_mount(&fs[0], "0:", 0);
|
||||
f_mount(&fs[1], "1:", 0);
|
||||
f_mount(&fs0, "0:", 0);
|
||||
f_mount(&fs1, "1:", 0);
|
||||
|
||||
<span class="c">/* Open source file on the drive 1 */</span>
|
||||
fr = <em>f_open</em>(&fsrc, "1:file.bin", FA_READ);
|
||||
@@ -166,8 +166,8 @@ int main (void)
|
||||
f_close(&fdst);
|
||||
|
||||
<span class="c">/* Unregister work area prior to discard it */</span>
|
||||
f_mount(NULL, "0:", 0);
|
||||
f_mount(NULL, "1:", 0);
|
||||
f_mount(0, "0:", 0);
|
||||
f_mount(0, "1:", 0);
|
||||
|
||||
return (int)fr;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user