fatfs v0.10 Oct 02,2013:
- Added selection of character encoding on the file. (_STRF_ENCODE) - Added f_closedir(). - Added forced full FAT scan for f_getfree(). (_FS_NOFSINFO) - Added forced mount feature with changes of f_mount(). - Improved behavior of volume auto detection. - Improved write throughput of f_puts() and f_printf(). - Changed argument of f_chdrive(), f_mkfs(), disk_read() and disk_write(). - Fixed f_write() can be truncated when the file size is close to 4GB. - Fixed f_open(), f_mkdir() and f_setlabel() can return incorrect error code.
This commit is contained in:
1 parent
750225eb33
commit
f9a05f6eda
83 files changed
+1636
-1121
No files matched your search
+4
-4
@@ -27,7 +27,7 @@ FRESULT f_getfree (
|
||||
<h4>Parameters</h4>
|
||||
<dl class="par">
|
||||
<dt>path</dt>
|
||||
<dd>Pinter to the null-terminated string that specifies the <a href="filename.html">logical drive</a>. A null-string means the current drive.</dd>
|
||||
<dd>Pinter to the null-terminated string that specifies the <a href="filename.html">logical drive</a>. A null-string means the default drive.</dd>
|
||||
<dt>nclst</dt>
|
||||
<dd>Pointer to the <tt>DWORD</tt> variable to store number of free clusters.</dd>
|
||||
<dt>fatfs</dt>
|
||||
@@ -53,7 +53,7 @@ FRESULT f_getfree (
|
||||
|
||||
<div class="para desc">
|
||||
<h4>Descriptions</h4>
|
||||
<p>The <tt>f_getfree()</tt> function gets number of free clusters on the drive. The member <tt>csize</tt> in the file system object is refrecting number of sectors per cluster, so that the free space in unit of sector can be calcurated with this. When FSInfo structure on FAT32 volume is not in sync, this function can return an incorrect free cluster count.</p>
|
||||
<p>The <tt>f_getfree()</tt> function gets number of free clusters on the volume. The member <tt>csize</tt> in the file system object indicates number of sectors per cluster, so that the free space in unit of sector can be calcurated with this information. When FSINFO structure on the FAT32 volume is not in sync, this function can return an incorrect free cluster count. To avoid this problem, FatFs can be forced full FAT scan by <tt>_FS_NOFSINFO</tt> option.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -78,8 +78,8 @@ FRESULT f_getfree (
|
||||
tot_sect = (fs->n_fatent - 2) * fs->csize;
|
||||
fre_sect = fre_clust * fs->csize;
|
||||
|
||||
<span class="c">/* Print free space in unit of KiB (assuming 512 bytes/sector) */</span>
|
||||
printf("%lu KB total drive space.\n%lu KB available.\n",
|
||||
<span class="c">/* Print the free space (assuming 512 bytes/sector) */</span>
|
||||
printf("%10lu KiB total drive space.\n%10lu KiB available.\n",
|
||||
tot_sect / 2, fre_sect / 2);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user