FatFs integration

struct fatfs_desc fatfs_desc_t

FatFs instance descriptor.

struct fatfs_file_desc fatfs_file_desc_t

FatFs file instance descriptor.

const vfs_file_system_t fatfs_file_system

The FatFs vfs driver, a pointer to a fatfs_desc_t must be provided as vfs_mountp::private_data.

FATFS_YEAR_OFFSET

The year in FatFs timestamps is relative to this offset.

1
(1980)
EPOCH_YEAR_OFFSET

The epoch offset is used to convert between FatFs and time_t timestamps.

1
(1970)
FATFS_MAX_VOL_STR_LEN

size needed for volume strings like “n:/” where n is the volume id

1
(6)
FATFS_MOUNT_OPT

0:mount on first file access, 1 mount in f_mount() call

1
(1)
FATFS_MAX_ABS_PATH_SIZE

Size of path buffer for absolute paths.

1
(FATFS_MAX_VOL_STR_LEN + VFS_NAME_MAX + 1)

Most FatFs file operations need an absolute path. This defines the size of the needed buffer to circumvent stack allocation within vfs-wrappers

struct fatfs_desc

FatFs instance descriptor.

FATFS fat_fs

FatFs work area needed for each volume.

uint8_t vol_idx

low level device that is used by FatFs

char abs_path_str_buff()

most FatFs file operations need an absolute path.

This buffer provides static memory to circumvent stack allocation within vfs-wrappers

struct fatfs_file_desc

FatFs file instance descriptor.

FIL file

FatFs work area for a single file.

char fname()

name of the file (e.g.

f_stat uses filename instead of FIL)