42 #error Wrong configuration file (ffconf.h).
55 extern PARTITION VolToPart[];
56 #define LD2PD(vol) (VolToPart[vol].pd)
57 #define LD2PT(vol) (VolToPart[vol].pt)
59 #define LD2PD(vol) (BYTE)(vol)
68 #error _LFN_UNICODE must be 0 in non-LFN cfg.
73 #define _TEXT(x) L ## x
237 #if _USE_FORWARD && _FS_TINY
238 FRESULT f_forward(
FIL* fp, UINT (*func)(
const BYTE*, UINT), UINT btf,
241 #if _FS_MINIMIZE <= 2
244 #if _FS_MINIMIZE == 0 && !_FS_READONLY
250 #if _FS_MINIMIZE <= 1
253 #if _FS_MINIMIZE <= 1
256 #if _FS_MINIMIZE <= 1
259 #if _FS_MINIMIZE == 0 && !_FS_READONLY
262 #if _FS_MINIMIZE == 0 && !_FS_READONLY
265 #if _FS_MINIMIZE == 0 && !_FS_READONLY
268 #if _FS_MINIMIZE == 0
271 #if _FS_MINIMIZE == 0 && !_FS_READONLY
274 #if _FS_MINIMIZE == 0 && !_FS_READONLY
278 FRESULT f_chdir(
const TCHAR* path);
280 #if _FS_RPATH >= 1 && _VOLUMES >= 2
281 FRESULT f_chdrive(
const TCHAR* path);
284 FRESULT f_getcwd(TCHAR* buff, UINT len);
286 #if _FS_MINIMIZE == 0 && !_FS_READONLY
290 FRESULT f_getlabel(
const TCHAR* path, TCHAR* label, DWORD* sn);
292 #if _USE_LABEL && !_FS_READONLY
293 FRESULT f_setlabel(
const TCHAR* label);
296 #if _USE_MKFS && !_FS_READONLY
297 FRESULT f_mkfs(
const TCHAR* path, BYTE sfd, UINT au);
299 #if _USE_MKFS && !_FS_READONLY && _MULTI_PARTITION
300 FRESULT f_fdisk(BYTE pdrv,
const DWORD szt[],
void* work);
302 #if _USE_STRFUNC && !_FS_READONLY
303 int f_putc(TCHAR c,
FIL* fp);
305 #if _USE_STRFUNC && !_FS_READONLY
306 int f_puts(
const TCHAR* str,
FIL* cp);
308 #if _USE_STRFUNC && !_FS_READONLY
309 int f_printf(
FIL* fp,
const TCHAR* str, ...);
312 TCHAR* f_gets(TCHAR* buff,
int len,
FIL* fp);
318 #define f_eof(fp) (((fp)->fptr == (fp)->fsize) ? 1 : 0)
319 #define f_error(fp) ((fp)->err)
320 #define f_tell(fp) ((fp)->fptr)
321 #define f_size(fp) ((fp)->fsize)
342 WCHAR ff_convert (WCHAR chr, UINT dir);
344 WCHAR ff_wtoupper (WCHAR chr);
346 void* ff_memalloc (UINT msize);
347 void ff_memfree (
void* mblock);
373 #define FA_OPEN_EXISTING 0x00
378 #define FA_WRITE 0x02
382 #define FA_CREATE_NEW 0x04
385 #define FA_CREATE_ALWAYS 0x08
388 #define FA_OPEN_ALWAYS 0x10
393 #define FA__WRITTEN 0x20
394 #define FA__DIRTY 0x40
432 #define CREATE_LINKMAP 0xFFFFFFFF
444 #if _WORD_ACCESS == 1
445 #define LD_WORD(ptr) (WORD)(*(WORD*)(BYTE*)(ptr))
446 #define LD_DWORD(ptr) (DWORD)(*(DWORD*)(BYTE*)(ptr))
447 #define ST_WORD(ptr,val) *(WORD*)(BYTE*)(ptr)=(WORD)(val)
448 #define ST_DWORD(ptr,val) *(DWORD*)(BYTE*)(ptr)=(DWORD)(val)
450 #define LD_WORD(ptr) (WORD)(((WORD)*((BYTE*)(ptr)+1)<<8)|(WORD)*(BYTE*)(ptr))
451 #define LD_DWORD(ptr) (DWORD)(((DWORD)*((BYTE*)(ptr)+3)<<24)|((DWORD)*((BYTE*)(ptr)+2)<<16)|((WORD)*((BYTE*)(ptr)+1)<<8)|*(BYTE*)(ptr))
452 #define ST_WORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *((BYTE*)(ptr)+1)=(BYTE)((WORD)(val)>>8)
453 #define ST_DWORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *((BYTE*)(ptr)+1)=(BYTE)((WORD)(val)>>8); *((BYTE*)(ptr)+2)=(BYTE)((DWORD)(val)>>16); *((BYTE*)(ptr)+3)=(BYTE)((DWORD)(val)>>24)
FRESULT f_opendir(DIR *dp, const TCHAR *path)
Create a Directory Object.
FRESULT f_chmod(const TCHAR *path, BYTE value, BYTE mask)
Change Attribute.
FRESULT f_lseek(FIL *fp, DWORD ofs)
Seek File R/W Pointer.
FRESULT
File function return code.
int ff_del_syncobj(_SYNC_t sobj)
Directory object structure.
File system object structure.
FRESULT f_mkdir(const TCHAR *path)
Create a Directory.
FRESULT f_rename(const TCHAR *path_old, const TCHAR *path_new)
Rename File/Directory.
FRESULT f_close(FIL *fp)
Close File.
FRESULT f_getfree(const TCHAR *path, DWORD *nclst, FATFS **fatfs)
Get Number of Free Clusters.
#define _SYNC_t
O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc..
FRESULT f_utime(const TCHAR *path, const FILINFO *fno)
Change Timestamp.
FRESULT f_write(FIL *fp, const void *buff, UINT btw, UINT *bw)
Write File.
FRESULT f_read(FIL *fp, void *buff, UINT btr, UINT *br)
Read File.
FRESULT f_mount(FATFS *fs, const TCHAR *path, BYTE opt)
Mount/Unmount a Logical Drive.
FRESULT f_stat(const TCHAR *path, FILINFO *fno)
Get File Status.
FRESULT f_truncate(FIL *fp)
Truncate File.
FRESULT f_unlink(const TCHAR *path)
Delete a File or Directory.
DWORD get_fattime(void)
Get the time from the RTC. This function is used from the FatFs and the function prototype is given ...
FRESULT f_open(FIL *fp, const TCHAR *path, BYTE mode)
Open or Create a File.
#define _MAX_SS
Maximum sector size to be handled. Always set 512 for memory card and hard disk but a larger value ma...
FRESULT f_readdir(DIR *dp, FILINFO *fno)
Read Directory Entries in Sequence.
FRESULT f_closedir(DIR *dp)
Close Directory.
int ff_cre_syncobj(BYTE vol, _SYNC_t *sobj)
void ff_rel_grant(_SYNC_t sobj)
int ff_req_grant(_SYNC_t sobj)
FRESULT f_sync(FIL *fp)
Synchronize the File.