23 #define FF_DEFINED 89352 32 #if FF_DEFINED != FFCONF_DEF 33 #error Wrong configuration file (ffconf.h). 40 #if FF_MULTI_PARTITION 45 extern PARTITION VolToPart[];
55 #if FF_USE_LFN && FF_LFN_UNICODE == 1 58 #define _TEXT(x) L ## x 59 #elif FF_USE_LFN && FF_LFN_UNICODE == 2 62 #define _TEXT(x) u8 ## x 63 #elif FF_USE_LFN && (FF_LFN_UNICODE < 0 || FF_LFN_UNICODE > 2) 64 #error Wrong FF_LFN_UNICODE setting 78 typedef QWORD FSIZE_t;
80 typedef DWORD FSIZE_t;
96 #if FF_MAX_SS != FF_MIN_SS 213 TCHAR altname[FF_SFN_BUF + 1];
214 TCHAR fname[FF_LFN_BUF + 1];
243 FR_TOO_MANY_OPEN_FILES,
252 FRESULT f_open (
FIL* fp,
const TCHAR* path, BYTE mode);
253 FRESULT f_close (
FIL* fp);
254 FRESULT f_read (
FIL* fp,
void* buff, UINT btr, UINT* br);
255 FRESULT f_write (
FIL* fp,
const void* buff, UINT btw, UINT* bw);
256 FRESULT f_lseek (
FIL* fp, FSIZE_t ofs);
257 FRESULT f_truncate (
FIL* fp);
258 FRESULT f_sync (
FIL* fp);
259 FRESULT f_opendir (
FATFS_DIR* dp,
const TCHAR* path);
262 FRESULT f_findfirst (
FATFS_DIR* dp,
FILINFO* fno,
const TCHAR* path,
const TCHAR* pattern);
264 FRESULT f_mkdir (
const TCHAR* path);
265 FRESULT f_unlink (
const TCHAR* path);
266 FRESULT f_rename (
const TCHAR* path_old,
const TCHAR* path_new);
267 FRESULT f_stat (
const TCHAR* path,
FILINFO* fno);
268 FRESULT f_chmod (
const TCHAR* path, BYTE attr, BYTE mask);
269 FRESULT f_utime (
const TCHAR* path,
const FILINFO* fno);
270 FRESULT f_chdir (
const TCHAR* path);
271 FRESULT f_chdrive (
const TCHAR* path);
272 FRESULT f_getcwd (TCHAR* buff, UINT len);
273 FRESULT f_getfree (
const TCHAR* path, DWORD* nclst,
FATFS** fatfs);
274 FRESULT f_getlabel (
const TCHAR* path, TCHAR* label, DWORD* vsn);
275 FRESULT f_setlabel (
const TCHAR* label);
276 FRESULT f_forward (
FIL* fp, UINT(*func)(
const BYTE*,UINT), UINT btf, UINT* bf);
277 FRESULT f_expand (
FIL* fp, FSIZE_t szf, BYTE opt);
278 FRESULT f_mount (
FATFS* fs,
const TCHAR* path, BYTE opt);
279 FRESULT f_mkfs (
const TCHAR* path, BYTE opt, DWORD au,
void* work, UINT len);
280 FRESULT f_fdisk (BYTE pdrv,
const DWORD* szt,
void* work);
281 FRESULT f_setcp (WORD cp);
282 int f_putc (TCHAR c,
FIL* fp);
283 int f_puts (
const TCHAR* str,
FIL* cp);
284 int f_printf (
FIL* fp,
const TCHAR* str, ...);
285 TCHAR* f_gets (TCHAR* buff,
int len,
FIL* fp);
287 #define f_eof(fp) ((int)((fp)->fptr == (fp)->obj.objsize)) 288 #define f_error(fp) ((fp)->err) 289 #define f_tell(fp) ((fp)->fptr) 290 #define f_size(fp) ((fp)->obj.objsize) 291 #define f_rewind(fp) f_lseek((fp), 0) 292 #define f_rewinddir(dp) f_readdir((dp), 0) 293 #define f_rmdir(path) f_unlink(path) 294 #define f_unmount(path) f_mount(0, path, 0) 307 #if !FF_FS_READONLY && !FF_FS_NORTC 308 DWORD get_fattime (
void);
313 WCHAR ff_oem2uni (WCHAR oem, WORD cp);
314 WCHAR ff_uni2oem (DWORD uni, WORD cp);
315 DWORD ff_wtoupper (DWORD uni);
317 #if FF_USE_LFN == 3 || FF_FS_HEAPBUF 318 void* ff_memalloc (UINT msize);
319 void ff_memfree (
void* mblock);
324 int ff_cre_syncobj (BYTE vol, FF_SYNC_t* sobj);
325 int ff_req_grant (FF_SYNC_t sobj);
326 void ff_rel_grant (FF_SYNC_t sobj);
327 int ff_del_syncobj (FF_SYNC_t sobj);
339 #define FA_WRITE 0x02 340 #define FA_OPEN_EXISTING 0x00 341 #define FA_CREATE_NEW 0x04 342 #define FA_CREATE_ALWAYS 0x08 343 #define FA_OPEN_ALWAYS 0x10 344 #define FA_OPEN_APPEND 0x30 347 #define CREATE_LINKMAP ((FSIZE_t)0 - 1) 351 #define FM_FAT32 0x02 352 #define FM_EXFAT 0x04