8typedef unsigned int UINT;
11typedef unsigned char BYTE;
15typedef unsigned short WORD;
16typedef unsigned short WCHAR;
20typedef unsigned long DWORD;
23typedef unsigned long long QWORD;
31typedef struct __FATFS FATFS;
92#define FA_OPEN_EXISTING 0x00
93#define FA_CREATE_NEW 0x04
94#define FA_CREATE_ALWAYS 0x08
95#define FA_OPEN_ALWAYS 0x10
96#define FA_OPEN_APPEND 0x30
139#define f_size(fp) ((fp)->obj.objsize)
140#define f_tell(fp) ((fp)->fptr)
141#define f_eof(fp) ((int)((fp)->fptr == (fp)->obj.objsize))
FRESULT f_unlink(const TCHAR *path)
Delete an existing file or directory.
FRESULT
File function return code (FRESULT)
Definition ff_ifc.h:106
FRESULT f_close(FIL *fp)
Close an open file object.
FRESULT f_lseek(FIL *fp, FSIZE_t ofs)
Move file pointer of the file object.
FRESULT f_rename(const TCHAR *path_old, const TCHAR *path_new)
Rename/Move a file or directory.
FRESULT f_read(FIL *fp, void *buff, UINT btr, UINT *br)
Read data from the file.
FRESULT f_write(FIL *fp, const void *buff, UINT btw, UINT *bw)
Write data to the file.
FRESULT f_open(FIL *fp, const TCHAR *path, BYTE mode)
Open or create a file.
@ FR_NO_FILESYSTEM
(13) There is no valid FAT volume
Definition ff_ifc.h:120
@ FR_EXIST
(8) Access denied due to prohibited access
Definition ff_ifc.h:115
@ FR_INVALID_PARAMETER
(19) Given parameter is invalid
Definition ff_ifc.h:126
@ FR_INVALID_OBJECT
(9) The file/directory object is invalid
Definition ff_ifc.h:116
@ FR_TIMEOUT
(15) Could not get a grant to access the volume within defined period
Definition ff_ifc.h:122
@ FR_INVALID_DRIVE
(11) The logical drive number is invalid
Definition ff_ifc.h:118
@ FR_MKFS_ABORTED
(14) The f_mkfs() aborted due to any problem
Definition ff_ifc.h:121
@ FR_TOO_MANY_OPEN_FILES
(18) Number of open files > _FS_LOCK
Definition ff_ifc.h:125
@ FR_OK
(0) Succeeded
Definition ff_ifc.h:107
@ FR_LOCKED
(16) The operation is rejected according to the file sharing policy
Definition ff_ifc.h:123
@ FR_INVALID_NAME
(6) The path name format is invalid
Definition ff_ifc.h:113
@ FR_DENIED
(7) Access denied due to prohibited access or directory full
Definition ff_ifc.h:114
@ FR_NO_FILE
(4) Could not find the file
Definition ff_ifc.h:111
@ FR_DISK_ERR
(1) A hard error occurred in the low level disk I/O layer
Definition ff_ifc.h:108
@ FR_INT_ERR
(2) Assertion failed
Definition ff_ifc.h:109
@ FR_WRITE_PROTECTED
(10) The physical drive is write protected
Definition ff_ifc.h:117
@ FR_NOT_READY
(3) The physical drive cannot work
Definition ff_ifc.h:110
@ FR_NO_PATH
(5) Could not find the path
Definition ff_ifc.h:112
@ FR_NOT_ENOUGH_CORE
(17) LFN working buffer could not be allocated
Definition ff_ifc.h:124
@ FR_NOT_ENABLED
(12) The volume has no work area
Definition ff_ifc.h:119
FatFs file structure used in file operations.
Definition ff_ifc.h:66
BYTE * dir_ptr
FIL.dir_ptr.
Definition ff_ifc.h:74
BYTE err
FIL.err.
Definition ff_ifc.h:69
DWORD sect
FIL.sect.
Definition ff_ifc.h:72
DWORD dir_sect
FIL.dir_sect.
Definition ff_ifc.h:73
DWORD * cltbl
FIL.cltbl.
Definition ff_ifc.h:75
_FDID obj
FIL.obj.
Definition ff_ifc.h:67
BYTE flag
FIL.flag.
Definition ff_ifc.h:68
DWORD clust
FIL.clust.
Definition ff_ifc.h:71
FSIZE_t fptr
FIL.fptr.
Definition ff_ifc.h:70