fatfs v0.09b Jan 23,2013:

- Added f_getlabel() and f_setlabel(). (_USE_LABEL == 1)
This commit is contained in:
savelij13 committed 2025-09-11 09:51:27 +03:00
1 parent 030f12c942
commit 750225eb33
112 files changed
+1847 -1043

No files matched your search

+12 -13
View File
@@ -16,9 +16,9 @@
<p>The f_getfree function gets number of the free clusters.</p>
<pre>
FRESULT f_getfree (
const TCHAR* <em>Path</em>, <span class="c">/* Logical drive number */</span>
DWORD* <em>Clusters</em>, <span class="c">/* Pointer to the variable to store number of free clusters */</span>
FATFS** <em>FileSystemObject</em> <span class="c">/* Pointer to pointer to file system object */</span>
const TCHAR* <span class="arg">path</span>, <span class="c">/* [IN] Logical drive number */</span>
DWORD* <span class="arg">nclst</span>, <span class="c">/* [OUT] Number of free clusters */</span>
FATFS** <span class="arg">fatfs</span> <span class="c">/* [OUT] Corresponding file system object */</span>
);
</pre>
</div>
@@ -26,11 +26,11 @@ FRESULT f_getfree (
<div class="para arg">
<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>.</dd>
<dt>Clusters</dt>
<dd>Pointer to the DWORD variable to store number of free clusters.</dd>
<dt>FileSystemObject</dt>
<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>
<dt>nclst</dt>
<dd>Pointer to the <tt>DWORD</tt> variable to store number of free clusters.</dd>
<dt>fatfs</dt>
<dd>Pointer to pointer that to store a pointer to the corresponding file system object.</dd>
</dl>
</div>
@@ -53,7 +53,7 @@ FRESULT f_getfree (
<div class="para desc">
<h4>Descriptions</h4>
<p>The f_getfree 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 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>
</div>
@@ -78,10 +78,9 @@ 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 KB (assuming 512 bytes/sector) */</span>
printf("%lu KB total drive space.\n"
"%lu KB available.\n",
fre_sect / 2, tot_sect / 2);
<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",
tot_sect / 2, fre_sect / 2);
</pre>
</div>