API  2.2
TSmarT Software Library
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
FATFS Struct Reference

FATFS structure. More...

#include <ff.h>

Data Fields

BYTE fs_type
BYTE drv
BYTE csize
BYTE n_fats
BYTE wflag
BYTE fsi_flag
WORD n_rootdir
DWORD last_clust
DWORD free_clust
DWORD cdir
DWORD n_fatent
DWORD fsize
DWORD volbase
DWORD fatbase
DWORD dirbase
DWORD database
DWORD winsect
BYTE win [_MAX_SS]

Detailed Description

FATFS structure.


Field Documentation

DWORD cdir

Current directory start cluster (0:root)

BYTE csize

!< Sectors per cluster (1,2,4...128)

DWORD database

Data start sector

DWORD dirbase

Root directory start sector (FAT32:Cluster#)

BYTE drv

Physical drive number

DWORD fatbase

FAT start sector

DWORD free_clust

Number of free clusters

BYTE fs_type

FAT sub-type (0:Not mounted)

BYTE fsi_flag

FSINFO flags (b7:disabled, b0:dirty)

DWORD fsize

Sectors per FAT


File system mount ID

DWORD last_clust

Last allocated cluster

DWORD n_fatent

Number of FAT entries, = number of clusters + 2

BYTE n_fats

Number of FAT copies (1 or 2)

WORD n_rootdir

Number of root directory entries (FAT12/16)

DWORD volbase

Volume start sector

BYTE wflag

win[] flag (b0:dirty)


Disk access window for Directory, FAT (and file data at tiny cfg)

DWORD winsect

Current sector appearing in the win[]