23 #define FF_DEFINED 86631 31 #if FF_DEFINED != FFCONF_DEF 32 #error Wrong configuration file (ffconf.h). 41 typedef unsigned __int64 QWORD;
43 #define isnan(v) _isnan(v) 44 #define isinf(v) (!_finite(v)) 46 #elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) 49 typedef unsigned int UINT;
50 typedef unsigned char BYTE;
51 typedef uint16_t WORD;
52 typedef uint32_t DWORD;
53 typedef uint64_t QWORD;
58 typedef unsigned int UINT;
59 typedef unsigned char BYTE;
60 typedef unsigned short WORD;
61 typedef unsigned long DWORD;
70 #error exFAT feature wants C99 or later 72 typedef QWORD FSIZE_t;
80 #error exFAT needs to be enabled when enable 64-bit LBA 82 typedef DWORD FSIZE_t;
90 #if FF_USE_LFN && FF_LFN_UNICODE == 1 93 #define _TEXT(x) L ## x 94 #elif FF_USE_LFN && FF_LFN_UNICODE == 2 97 #define _TEXT(x) u8 ## x 98 #elif FF_USE_LFN && FF_LFN_UNICODE == 3 101 #define _TEXT(x) U ## x 102 #elif FF_USE_LFN && (FF_LFN_UNICODE < 0 || FF_LFN_UNICODE > 3) 103 #error Wrong FF_LFN_UNICODE setting 114 #if FF_MULTI_PARTITION 119 extern PARTITION VolToPart[];
123 #ifndef FF_VOLUME_STRS 124 extern const char* VolumeStr[FF_VOLUMES];
141 #if FF_MAX_SS != FF_MIN_SS 261 TCHAR altname[FF_SFN_BUF + 1];
262 TCHAR fname[FF_LFN_BUF + 1];
303 FR_TOO_MANY_OPEN_FILES,
312 FRESULT f_open (
FIL* fp,
const TCHAR* path, BYTE mode);
313 FRESULT f_close (
FIL* fp);
314 FRESULT f_read (
FIL* fp,
void* buff, UINT btr, UINT* br);
315 FRESULT f_write (
FIL* fp,
const void* buff, UINT btw, UINT* bw);
316 FRESULT f_lseek (
FIL* fp, FSIZE_t ofs);
317 FRESULT f_truncate (
FIL* fp);
318 FRESULT f_sync (
FIL* fp);
319 FRESULT f_opendir (
FATFS_DIR* dp,
const TCHAR* path);
322 FRESULT f_findfirst (
FATFS_DIR* dp,
FILINFO* fno,
const TCHAR* path,
const TCHAR* pattern);
324 FRESULT f_mkdir (
const TCHAR* path);
325 FRESULT f_unlink (
const TCHAR* path);
326 FRESULT f_rename (
const TCHAR* path_old,
const TCHAR* path_new);
327 FRESULT f_stat (
const TCHAR* path,
FILINFO* fno);
328 FRESULT f_chmod (
const TCHAR* path, BYTE attr, BYTE mask);
329 FRESULT f_utime (
const TCHAR* path,
const FILINFO* fno);
330 FRESULT f_chdir (
const TCHAR* path);
331 FRESULT f_chdrive (
const TCHAR* path);
332 FRESULT f_getcwd (TCHAR* buff, UINT len);
333 FRESULT f_getfree (
const TCHAR* path, DWORD* nclst,
FATFS** fatfs);
334 FRESULT f_getlabel (
const TCHAR* path, TCHAR* label, DWORD* vsn);
335 FRESULT f_setlabel (
const TCHAR* label);
336 FRESULT f_forward (
FIL* fp, UINT(*func)(
const BYTE*,UINT), UINT btf, UINT* bf);
337 FRESULT f_expand (
FIL* fp, FSIZE_t fsz, BYTE opt);
338 FRESULT f_mount (
FATFS* fs,
const TCHAR* path, BYTE opt);
339 FRESULT f_mkfs (
const TCHAR* path,
const MKFS_PARM* opt,
void* work, UINT len);
340 FRESULT f_fdisk (BYTE pdrv,
const LBA_t ptbl[],
void* work);
341 FRESULT f_setcp (WORD cp);
342 int f_putc (TCHAR c,
FIL* fp);
343 int f_puts (
const TCHAR* str,
FIL* cp);
344 int f_printf (
FIL* fp,
const TCHAR* str, ...);
345 TCHAR* f_gets (TCHAR* buff,
int len,
FIL* fp);
347 #define f_eof(fp) ((int)((fp)->fptr == (fp)->obj.objsize)) 348 #define f_error(fp) ((fp)->err) 349 #define f_tell(fp) ((fp)->fptr) 350 #define f_size(fp) ((fp)->obj.objsize) 351 #define f_rewind(fp) f_lseek((fp), 0) 352 #define f_rewinddir(dp) f_readdir((dp), 0) 353 #define f_rmdir(path) f_unlink(path) 354 #define f_unmount(path) f_mount(0, path, 0) 363 #if !FF_FS_READONLY && !FF_FS_NORTC 364 DWORD get_fattime (
void);
369 WCHAR ff_oem2uni (WCHAR oem, WORD cp);
370 WCHAR ff_uni2oem (DWORD uni, WORD cp);
371 DWORD ff_wtoupper (DWORD uni);
373 #if FF_USE_LFN == 3 || FF_FS_HEAPBUF 374 void* ff_memalloc (UINT msize);
375 void ff_memfree (
void* mblock);
380 int ff_cre_syncobj (BYTE vol, FF_SYNC_t* sobj);
381 int ff_req_grant (FF_SYNC_t sobj);
382 void ff_rel_grant (FF_SYNC_t sobj);
383 int ff_del_syncobj (FF_SYNC_t sobj);
395 #define FA_WRITE 0x02 396 #define FA_OPEN_EXISTING 0x00 397 #define FA_CREATE_NEW 0x04 398 #define FA_CREATE_ALWAYS 0x08 399 #define FA_OPEN_ALWAYS 0x10 400 #define FA_OPEN_APPEND 0x30 403 #define CREATE_LINKMAP ((FSIZE_t)0 - 1) 407 #define FM_FAT32 0x02 408 #define FM_EXFAT 0x04