mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-24 04:27:42 +00:00
FatFs update to R0.11a.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
<div class="para">
|
||||
<h2>FIL</h2>
|
||||
<p>The <tt>FIL</tt> structure (file object) holds the state of an open file. It is created by <tt>f_open()</tt> function and discarded by <tt>f_close()</tt> function. Application program must not modify any member in this structure except for <tt>cltbl</tt>. Note that a sector buffer is defined in this structure at non-tiny configuration (<tt>_FS_TINY == 0</tt>), so that the <tt>FIL</tt> structures at that configuration should not be defined as auto variable.</p>
|
||||
<p>The <tt>FIL</tt> structure (file object) holds the state of an open file. It is created by <tt>f_open</tt> function and discarded by <tt>f_close</tt> function. Application program must not modify any member in this structure except for <tt>cltbl</tt>, or any data on the FAT volume can be collapsed. Note that a sector buffer is defined in this structure at non-tiny configuration (<tt>_FS_TINY == 0</tt>), so that the <tt>FIL</tt> structures at that configuration should not be defined as auto variable.</p>
|
||||
|
||||
<pre>
|
||||
<span class="k">typedef</span> <span class="k">struct</span> {
|
||||
@@ -24,20 +24,20 @@
|
||||
DWORD fptr; <span class="c">/* File read/write pointer (Byte offset origin from top of the file) */</span>
|
||||
DWORD fsize; <span class="c">/* File size in unit of byte */</span>
|
||||
DWORD sclust; <span class="c">/* File start cluster */</span>
|
||||
DWORD clust; <span class="c">/* Current cluster */</span>
|
||||
DWORD dsect; <span class="c">/* Current data sector */</span>
|
||||
DWORD clust; <span class="c">/* Current cluster of fptr (One cluster behind if fptr is on the cluster boundary. Invalid if fptr == 0.) */</span>
|
||||
DWORD dsect; <span class="c">/* Current data sector (Can be invalid if fptr is on the cluster boundary.)*/</span>
|
||||
<span class="k">#if</span> !_FS_READONLY
|
||||
DWORD dir_sect; <span class="c">/* Sector containing the directory entry */</span>
|
||||
DWORD dir_sect; <span class="c">/* Sector number containing the directory entry */</span>
|
||||
BYTE* dir_ptr; <span class="c">/* Ponter to the directory entry in the window */</span>
|
||||
<span class="k">#endif</span>
|
||||
<span class="k">#if</span> _USE_FASTSEEK
|
||||
DWORD* cltbl; <span class="c">/* Pointer to the cluster link map table (Nulled on file open) */</span>
|
||||
DWORD* cltbl; <span class="c">/* Pointer to the cluster link map table (Nulled on file open. Set by application.) */</span>
|
||||
<span class="k">#endif</span>
|
||||
<span class="k">#if</span> _FS_LOCK
|
||||
UINT lockid; <span class="c">/* Fle lock ID */</span>
|
||||
<span class="k">#endif</span>
|
||||
<span class="k">#if</span> !_FS_TINY
|
||||
BYTE buf[_MAX_SS]; <span class="c">/* File private data transfer buffer */</span>
|
||||
BYTE buf[_MAX_SS]; <span class="c">/* File private data transfer buffer (Always valid if fptr is not on the sector boundary but can be invalid if fptr is on the sector boundary.) */</span>
|
||||
<span class="k">#endif</span>
|
||||
} FIL;
|
||||
</pre>
|
||||
|
Reference in New Issue
Block a user