23#define FF_DEFINED 86631
31#if FF_DEFINED != FFCONF_DEF
32#error Wrong configuration file (ffconf.h).
41typedef 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)
49typedef unsigned int UINT;
50typedef unsigned char BYTE;
52typedef uint32_t DWORD;
53typedef uint64_t QWORD;
58typedef unsigned int UINT;
59typedef unsigned char BYTE;
60typedef unsigned short WORD;
61typedef unsigned long DWORD;
70#error exFAT feature wants C99 or later
80#error exFAT needs to be enabled when enable 64-bit LBA
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
119extern PARTITION VolToPart[];
123#ifndef FF_VOLUME_STRS
124extern 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,
312FRESULT f_open (
FIL* fp,
const TCHAR* path, BYTE mode);
313FRESULT f_close (
FIL* fp);
314FRESULT f_read (
FIL* fp,
void* buff, UINT btr, UINT* br);
315FRESULT f_write (
FIL* fp,
const void* buff, UINT btw, UINT* bw);
316FRESULT f_lseek (
FIL* fp, FSIZE_t ofs);
317FRESULT f_truncate (
FIL* fp);
318FRESULT f_sync (
FIL* fp);
319FRESULT f_opendir (
FATFS_DIR* dp,
const TCHAR* path);
322FRESULT f_findfirst (
FATFS_DIR* dp,
FILINFO* fno,
const TCHAR* path,
const TCHAR* pattern);
324FRESULT f_mkdir (
const TCHAR* path);
325FRESULT f_unlink (
const TCHAR* path);
326FRESULT f_rename (
const TCHAR* path_old,
const TCHAR* path_new);
327FRESULT f_stat (
const TCHAR* path,
FILINFO* fno);
328FRESULT f_chmod (
const TCHAR* path, BYTE attr, BYTE mask);
329FRESULT f_utime (
const TCHAR* path,
const FILINFO* fno);
330FRESULT f_chdir (
const TCHAR* path);
331FRESULT f_chdrive (
const TCHAR* path);
332FRESULT f_getcwd (TCHAR* buff, UINT len);
333FRESULT f_getfree (
const TCHAR* path, DWORD* nclst,
FATFS** fatfs);
334FRESULT f_getlabel (
const TCHAR* path, TCHAR* label, DWORD* vsn);
335FRESULT f_setlabel (
const TCHAR* label);
336FRESULT f_forward (
FIL* fp, UINT(*func)(
const BYTE*,UINT), UINT btf, UINT* bf);
337FRESULT f_expand (
FIL* fp, FSIZE_t fsz, BYTE opt);
338FRESULT f_mount (
FATFS* fs,
const TCHAR* path, BYTE opt);
339FRESULT f_mkfs (
const TCHAR* path,
const MKFS_PARM* opt,
void* work, UINT len);
340FRESULT f_fdisk (BYTE pdrv,
const LBA_t ptbl[],
void* work);
341FRESULT f_setcp (WORD cp);
342int f_putc (TCHAR c,
FIL* fp);
343int f_puts (
const TCHAR* str,
FIL* cp);
344int f_printf (
FIL* fp,
const TCHAR* str, ...);
345TCHAR* 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
364DWORD get_fattime (
void);
369WCHAR ff_oem2uni (WCHAR oem, WORD cp);
370WCHAR ff_uni2oem (DWORD uni, WORD cp);
371DWORD ff_wtoupper (DWORD uni);
373#if FF_USE_LFN == 3 || FF_FS_HEAPBUF
374void* ff_memalloc (UINT msize);
375void ff_memfree (
void* mblock);
380int ff_cre_syncobj (BYTE vol, FF_SYNC_t* sobj);
381int ff_req_grant (FF_SYNC_t sobj);
382void ff_rel_grant (FF_SYNC_t sobj);
383int ff_del_syncobj (FF_SYNC_t sobj);
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)