Loading...
Searching...
No Matches
FatFs integration

Detailed Description

Files

file  fatfs.h
 FatFs integration for vfs.
 

Data Structures

struct  fatfs_desc
 FatFs instance descriptor. More...
 
struct  fatfs_file_desc
 FatFs file instance descriptor. More...
 

Macros

#define FATFS_YEAR_OFFSET   (1980)
 The year in FatFs timestamps is relative to this offset.
 
#define EPOCH_YEAR_OFFSET   (1970)
 The epoch offset is used to convert between FatFs and time_t timestamps.
 
#define FATFS_MAX_VOL_STR_LEN   (6)
 size needed for volume strings like "n:/" where n is the volume id
 
#define FATFS_MOUNT_OPT   (1)
 0:mount on first file access, 1 mount in f_mount() call
 
#define CONFIG_FATFS_FORMAT_TYPE   FM_ANY
 FAT filesystem type that a file system should be formatted in by vfs_format()
 
#define CONFIG_FATFS_FORMAT_ALLOC_STATIC   0
 Statically allocate work buffer for format operation.
 
#define FATFS_MAX_ABS_PATH_SIZE   (FATFS_MAX_VOL_STR_LEN + VFS_NAME_MAX + 1)
 Size of path buffer for absolute paths.
 

Typedefs

typedef struct fatfs_desc fatfs_desc_t
 FatFs instance descriptor.
 
typedef struct fatfs_file_desc fatfs_file_desc_t
 FatFs file instance descriptor.
 

Variables

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.
 

Macro Definition Documentation

◆ CONFIG_FATFS_FORMAT_ALLOC_STATIC

#define CONFIG_FATFS_FORMAT_ALLOC_STATIC   0

Statically allocate work buffer for format operation.

This will statically allocate 512 bytes as the work buffer for the format operation.

If this is set to 0, dynamic allocation (malloc) will be used instead and format will fail if not enough memory is available.

Definition at line 63 of file fatfs.h.

◆ CONFIG_FATFS_FORMAT_TYPE

#define CONFIG_FATFS_FORMAT_TYPE   FM_ANY

FAT filesystem type that a file system should be formatted in by vfs_format()

Definition at line 49 of file fatfs.h.

◆ EPOCH_YEAR_OFFSET

#define EPOCH_YEAR_OFFSET   (1970)

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

Definition at line 36 of file fatfs.h.

◆ FATFS_MAX_ABS_PATH_SIZE

#define FATFS_MAX_ABS_PATH_SIZE   (FATFS_MAX_VOL_STR_LEN + VFS_NAME_MAX + 1)

Size of path buffer for absolute paths.

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

Definition at line 72 of file fatfs.h.

◆ FATFS_MAX_VOL_STR_LEN

#define FATFS_MAX_VOL_STR_LEN   (6)

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

Definition at line 39 of file fatfs.h.

◆ FATFS_MOUNT_OPT

#define FATFS_MOUNT_OPT   (1)

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

Definition at line 42 of file fatfs.h.

◆ FATFS_YEAR_OFFSET

#define FATFS_YEAR_OFFSET   (1980)

The year in FatFs timestamps is relative to this offset.

Definition at line 32 of file fatfs.h.