Add FatFs module by ChaN.
[bertos.git] / bertos / fs / fatfs / doc / en / sfatfs.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
2 <html lang="en">\r
3 <head>\r
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
5 <meta http-equiv="Content-Style-Type" content="text/css">\r
6 <link rel="up" title="FatFs" href="../00index_e.html">\r
7 <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">\r
8 <title>FatFs - FATFS</title>\r
9 </head>\r
10 \r
11 <body>\r
12 \r
13 <div class="para">\r
14 <h2>FATFS</h2>\r
15 <p>The <tt>FATFS</tt> structure holds dynamic work area of individual logical drives. It is given by application program and registerd/unregisterd to the FatFs module with f_mount function. Following members are in standard configuration. There is no member that can be changed from the application program.</p>\r
16 <pre>\r
17 typedef struct _FATFS {\r
18     BYTE    fs_type;      /* FAT sub type */\r
19     BYTE    drive;        /* Physical drive number */\r
20     BYTE    csize;        /* Number of sectors per cluster */\r
21     BYTE    n_fats;       /* Number of FAT copies */\r
22     BYTE    wflag;        /* win[] dirty flag (1:must be written back) */\r
23     BYTE    pad1;\r
24     WORD    id;           /* File system mount ID */\r
25     WORD    n_rootdir;    /* Number of root directory entries (0 on FAT32) */\r
26 #if _FS_REENTRANT\r
27     HANDLE  h_mutex;      /* Handle to the mutex (Platform dependent) */\r
28 #endif\r
29 #if _MAX_SS != 512\r
30     WORD    s_size;       /* Sector size */\r
31 #endif\r
32 #if !_FS_READONLY\r
33     BYTE    fsi_flag;     /* fsinfo dirty flag (1:must be written back) */\r
34     BYTE    pad2;\r
35     DWORD   last_clust;   /* Last allocated cluster */\r
36     DWORD   free_clust;   /* Number of free clusters */\r
37     DWORD   fsi_sector;   /* fsinfo sector */\r
38 #endif\r
39     DWORD   sects_fat;    /* Sectors per fat */\r
40     DWORD   max_clust;    /* Maximum cluster# + 1. Number of clusters is max_clust - 2 */\r
41     DWORD   fatbase;      /* FAT start sector */\r
42     DWORD   dirbase;      /* Root directory start sector (Cluster# on FAT32) */\r
43     DWORD   database;     /* Data start sector */\r
44     DWORD   winsect;      /* Current sector appearing in the win[] */\r
45     BYTE    win[MAX_SS];  /* Disk access window for Directory/FAT */\r
46 } FATFS;\r
47 </pre>\r
48 </div>\r
49 \r
50 <p class="foot"><a href="../00index_e.html">Return</a></p>\r
51 </body>\r
52 </html>\r