23#define FF_DEFINED 80386
29#if !defined(FFCONF_DEF)
32#if FF_DEFINED != FFCONF_DEF
33#error Wrong configuration file (ffconf.h).
42typedef unsigned __int64 QWORD;
44#define isnan(v) _isnan(v)
45#define isinf(v) (!_finite(v))
47#elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus)
50typedef unsigned int UINT;
51typedef unsigned char BYTE;
53typedef uint32_t DWORD;
54typedef uint64_t QWORD;
59typedef unsigned int UINT;
60typedef unsigned char BYTE;
61typedef unsigned short WORD;
62typedef unsigned long DWORD;
71#error exFAT feature wants C99 or later
81#error exFAT needs to be enabled when enable 64-bit LBA
91#if FF_USE_LFN && FF_LFN_UNICODE == 1
94#define _TEXT(x) L ## x
95#elif FF_USE_LFN && FF_LFN_UNICODE == 2
98#define _TEXT(x) u8 ## x
99#elif FF_USE_LFN && FF_LFN_UNICODE == 3
102#define _TEXT(x) U ## x
103#elif FF_USE_LFN && (FF_LFN_UNICODE < 0 || FF_LFN_UNICODE > 3)
104#error Wrong FF_LFN_UNICODE setting
115#if FF_MULTI_PARTITION
120extern PARTITION VolToPart[];
124#ifndef FF_VOLUME_STRS
125extern const char* VolumeStr[FF_VOLUMES];
132#if FF_FS_EXFAT && FF_FS_RPATH
134#error FF_PATH_DEPTH must not be zero
143 FFXCWDL tbl[FF_PATH_DEPTH + 1];
160#if FF_MAX_SS != FF_MIN_SS
270 TCHAR altname[FF_SFN_BUF + 1];
271 TCHAR fname[FF_LFN_BUF + 1];
312 FR_TOO_MANY_OPEN_FILES,
323FRESULT f_open (
FIL*
fp,
const TCHAR* path, BYTE mode);
324FRESULT f_close (
FIL*
fp);
325FRESULT f_read (
FIL*
fp,
void* buff, UINT btr, UINT* br);
326FRESULT f_write (
FIL*
fp,
const void* buff, UINT btw, UINT* bw);
327FRESULT f_lseek (
FIL*
fp, FSIZE_t ofs);
328FRESULT f_truncate (
FIL*
fp);
329FRESULT f_sync (
FIL*
fp);
330FRESULT f_opendir (
DIR* dp,
const TCHAR* path);
331FRESULT f_closedir (
DIR* dp);
333FRESULT f_findfirst (
DIR* dp,
FILINFO* fno,
const TCHAR* path,
const TCHAR* pattern);
335FRESULT f_mkdir (
const TCHAR* path);
336FRESULT f_unlink (
const TCHAR* path);
337FRESULT f_rename (
const TCHAR* path_old,
const TCHAR* path_new);
338FRESULT f_stat (
const TCHAR* path,
FILINFO* fno);
339FRESULT f_chmod (
const TCHAR* path, BYTE attr, BYTE mask);
340FRESULT f_utime (
const TCHAR* path,
const FILINFO* fno);
341FRESULT f_chdir (
const TCHAR* path);
342FRESULT f_chdrive (
const TCHAR* path);
343FRESULT f_getcwd (TCHAR* buff, UINT len);
344FRESULT f_getfree (
const TCHAR* path, DWORD* nclst,
FATFS** fatfs);
345FRESULT f_getlabel (
const TCHAR* path, TCHAR* label, DWORD* vsn);
346FRESULT f_setlabel (
const TCHAR* label);
347FRESULT f_forward (
FIL*
fp, UINT(*func)(
const BYTE*,UINT), UINT btf, UINT* bf);
348FRESULT f_expand (
FIL*
fp, FSIZE_t fsz, BYTE opt);
349FRESULT f_mount (
FATFS* fs,
const TCHAR* path, BYTE opt);
350FRESULT f_mkfs (
const TCHAR* path,
const MKFS_PARM* opt,
void* work, UINT len);
351FRESULT f_fdisk (BYTE pdrv,
const LBA_t ptbl[],
void* work);
352FRESULT f_setcp (WORD cp);
353int f_putc (TCHAR c,
FIL*
fp);
354int f_puts (
const TCHAR* str,
FIL* cp);
355int f_printf (
FIL*
fp,
const TCHAR* str, ...);
356TCHAR* f_gets (TCHAR* buff,
int len,
FIL*
fp);
360#define f_eof(fp) ((int)((fp)->fptr == (fp)->obj.objsize))
361#define f_error(fp) ((fp)->err)
362#define f_tell(fp) ((fp)->fptr)
363#define f_size(fp) ((fp)->obj.objsize)
364#define f_rewind(fp) f_lseek((fp), 0)
365#define f_rewinddir(dp) f_readdir((dp), 0)
366#define f_rmdir(path) f_unlink(path)
367#define f_unmount(path) f_mount(0, path, 0)
377#if !FF_FS_READONLY && !FF_FS_NORTC
378DWORD get_fattime (
void);
385WCHAR ff_oem2uni (WCHAR oem, WORD cp);
386WCHAR ff_uni2oem (DWORD uni, WORD cp);
387DWORD ff_wtoupper (DWORD uni);
394void* ff_memalloc (UINT msize);
395void ff_memfree (
void* mblock);
398int ff_mutex_create (
int vol);
399void ff_mutex_delete (
int vol);
400int ff_mutex_take (
int vol);
401void ff_mutex_give (
int vol);
414#define FA_OPEN_EXISTING 0x00
415#define FA_CREATE_NEW 0x04
416#define FA_CREATE_ALWAYS 0x08
417#define FA_OPEN_ALWAYS 0x10
418#define FA_OPEN_APPEND 0x30
421#define CREATE_LINKMAP ((FSIZE_t)0 - 1)
#define fp
frame-pointer */
Definition: regs.h:65