1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=iso-8859-1">
5 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
6 <link rel=
"up" title=
"FatFs" href=
"../00index_e.html">
7 <link rel=
"alternate" hreflang=
"ja" title=
"Japanese" href=
"../ja/sfatfs.html">
8 <link rel=
"stylesheet" href=
"../css_e.css" type=
"text/css" media=
"screen" title=
"ELM Default">
9 <title>FatFs - FATFS
</title>
16 <p>The
<tt>FATFS
</tt> structure (file system object) holds dynamic work area of individual logical drives. It is given by application program and registerd/unregisterd to the FatFs module with
<tt>f_mount()
</tt> function. Initialization is done on first API call after
<tt>f_mount()
</tt> function or media change. Application program must not modify any member in this structure.
</p>
18 <span class=
"k">typedef
</span> <span class=
"k">struct
</span> {
19 BYTE fs_type;
<span class=
"c">/* FAT sub-type (
0:Not mounted) */
</span>
20 BYTE drv;
<span class=
"c">/* Physical drive number */
</span>
21 BYTE csize;
<span class=
"c">/* Sectors per cluster (
1,
2,
4,...,
128) */
</span>
22 BYTE n_fats;
<span class=
"c">/* Number of FAT copies (
1,
2) */
</span>
23 BYTE wflag;
<span class=
"c">/* win[] flag (b0:win[] is dirty) */
</span>
24 BYTE fsi_flag;
<span class=
"c">/* FSINFO flags (b7:Disabled, b0:Dirty) */
</span>
25 WORD id;
<span class=
"c">/* File system mount ID */
</span>
26 WORD n_rootdir;
<span class=
"c">/* Number of root directory entries (FAT12/
16) */
</span>
27 <span class=
"k">#if
</span> _MAX_SS != _MIN_SS
28 WORD ssize;
<span class=
"c">/* Sector size (
512,
1024,
2048 or
4096) */
</span>
29 <span class=
"k">#endif
</span>
30 <span class=
"k">#if
</span> _FS_REENTRANT
31 _SYNC_t sobj;
<span class=
"c">/* Identifier of sync object */
</span>
32 <span class=
"k">#endif
</span>
33 <span class=
"k">#if
</span> !_FS_READONLY
34 DWORD last_clust;
<span class=
"c">/* FSINFO: Last allocated cluster */
</span>
35 DWORD free_clust;
<span class=
"c">/* FSINFO: Number of free clusters */
</span>
36 <span class=
"k">#endif
</span>
37 <span class=
"k">#if
</span> _FS_RPATH
38 DWORD cdir;
<span class=
"c">/* Current directory start cluster (
0:root) */
</span>
39 <span class=
"k">#endif
</span>
40 DWORD n_fatent;
<span class=
"c">/* Number of FAT entries (== Number of clusters +
2) */
</span>
41 DWORD fsize;
<span class=
"c">/* Sectors per FAT */
</span>
42 DWORD volbase;
<span class=
"c">/* Volume start sector */
</span>
43 DWORD fatbase;
<span class=
"c">/* FAT area start sector */
</span>
44 DWORD dirbase;
<span class=
"c">/* Root directory area start sector (FAT32: Cluster#) */
</span>
45 DWORD database;
<span class=
"c">/* Data area start sector */
</span>
46 DWORD winsect;
<span class=
"c">/* Current sector appearing in the win[] */
</span>
47 BYTE win[_MAX_SS];
<span class=
"c">/* Disk access window for directory, FAT (and file data at tiny cfg) */
</span>
52 <p class=
"foot"><a href=
"../00index_e.html">Return
</a></p>