X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/e1deb7c3bc0500aabf5d099adb231f6d1d27f01d..b30c4e8f1aef96f6fdc93da9f125545f5f74d06e:/fatfs/doc/en/sfatfs.html diff --git a/fatfs/doc/en/sfatfs.html b/fatfs/doc/en/sfatfs.html index b420850..e701f44 100644 --- a/fatfs/doc/en/sfatfs.html +++ b/fatfs/doc/en/sfatfs.html @@ -13,37 +13,45 @@

FATFS

-

The FATFS 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 f_mount() function. Initialization is done on first API call after f_mount() function or media change. Application program must not modify any member in this structure.

+

The FATFS 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 f_mount function. Initialization is done on first API call after f_mount function or media change. Application program must not modify any member in this structure, or any data on the FAT volume can be collapsed.

 typedef struct {
-    BYTE    fs_type;      /* FAT sub-type (0:Not mounted) */
+    BYTE    fs_type;      /* File system type (0, FS_FAT12, FS_FAT16, FS_FAT32 or FS_EXFAT) */
     BYTE    drv;          /* Physical drive number */
-    BYTE    csize;        /* Sectors per cluster (1,2,4,...,128) */
     BYTE    n_fats;       /* Number of FAT copies (1,2) */
     BYTE    wflag;        /* win[] flag (b0:win[] is dirty) */
     BYTE    fsi_flag;     /* FSINFO flags (b7:Disabled, b0:Dirty) */
     WORD    id;           /* File system mount ID */
     WORD    n_rootdir;    /* Number of root directory entries (FAT12/16) */
+    WORD    csize;        /* Sectors per cluster */
 #if _MAX_SS != _MIN_SS
     WORD    ssize;        /* Sector size (512,1024,2048 or 4096) */
 #endif
+#if _FS_EXFAT
+    BYTE*   dirbuf;       /* Directory entry block scratchpad buffer */
+#endif
 #if _FS_REENTRANT
     _SYNC_t sobj;         /* Identifier of sync object */
 #endif
 #if !_FS_READONLY
-    DWORD   last_clust;   /* FSINFO: Last allocated cluster */
-    DWORD   free_clust;   /* FSINFO: Number of free clusters */
+    DWORD   last_clust;   /* FSINFO: Last allocated cluster (0xFFFFFFFF if invalid) */
+    DWORD   free_clust;   /* FSINFO: Number of free clusters (0xFFFFFFFF if invalid) */
 #endif
 #if _FS_RPATH
-    DWORD   cdir;         /* Current directory start cluster (0:root) */
+    DWORD   cdir;         /* Cluster number of current directory (0:root) */
+#if _FS_EXFAT
+    DWORD   cdc_scl;      /* Containing directory start cluster (invalid when cdir is 0) */
+    DWORD   cdc_size;     /* b31-b8:Size of containing directory, b7-b0: Chain status */
+    DWORD   cdc_ofs;      /* Offset in the containing directory (invalid when cdir is 0) */
+#endif
 #endif
-    DWORD   n_fatent;     /* Number of FAT entries (== Number of clusters + 2) */
+    DWORD   n_fatent;     /* Number of FAT entries (Number of clusters + 2) */
     DWORD   fsize;        /* Sectors per FAT */
-    DWORD   volbase;      /* Volume start sector */
-    DWORD   fatbase;      /* FAT area start sector */
-    DWORD   dirbase;      /* Root directory area start sector (FAT32: Cluster#) */
-    DWORD   database;     /* Data area start sector */
-    DWORD   winsect;      /* Current sector appearing in the win[] */
+    DWORD   volbase;      /* Volume base LBA */
+    DWORD   fatbase;      /* FAT base LBA */
+    DWORD   dirbase;      /* Root directory base (LBA|Cluster) */
+    DWORD   database;     /* Data base LBA */
+    DWORD   winsect;      /* Sector LBA appearing in the win[] */
     BYTE    win[_MAX_SS]; /* Disk access window for directory, FAT (and file data at tiny cfg) */
 } FATFS;