CMSIS2000
0.0.7
|
Go to the source code of this file.
Data Structures | |
struct | DIR |
struct | FATFS |
struct | FIL |
struct | FILINFO |
Macros | |
#define | _FATFS 82786 /* Revision ID */ |
#define | _T(x) x |
#define | _TEXT(x) x |
#define | AM_ARC 0x20 /* Archive */ |
#define | AM_DIR 0x10 /* Directory */ |
#define | AM_HID 0x02 /* Hidden */ |
#define | AM_LFN 0x0F /* LFN entry */ |
#define | AM_MASK 0x3F /* Mask of defined bits */ |
#define | AM_RDO 0x01 /* Read only */ |
#define | AM_SYS 0x04 /* System */ |
#define | AM_VOL 0x08 /* Volume label */ |
#define | CREATE_LINKMAP 0xFFFFFFFF |
#define | EOF (-1) |
#define | f_eof(fp) (((fp)->fptr == (fp)->fsize) ? 1 : 0) |
#define | f_error(fp) (((fp)->flag & FA__ERROR) ? 1 : 0) |
#define | f_size(fp) ((fp)->fsize) |
#define | f_tell(fp) ((fp)->fptr) |
#define | FA__DIRTY 0x40 |
#define | FA__ERROR 0x80 |
#define | FA__WRITTEN 0x20 |
#define | FA_CREATE_ALWAYS 0x08 |
#define | FA_CREATE_NEW 0x04 |
#define | FA_OPEN_ALWAYS 0x10 |
#define | FA_OPEN_EXISTING 0x00 |
#define | FA_READ 0x01 |
#define | FA_WRITE 0x02 |
#define | FS_FAT12 1 |
#define | FS_FAT16 2 |
#define | FS_FAT32 3 |
#define | LD2PD(vol) (BYTE)(vol) /* Each logical drive is bound to the same physical drive number */ |
#define | LD2PT(vol) 0 /* Always mounts the 1st partition or in SFD */ |
#define | LD_DWORD(ptr) (DWORD)(((DWORD)*((BYTE*)(ptr)+3)<<24)|((DWORD)*((BYTE*)(ptr)+2)<<16)|((WORD)*((BYTE*)(ptr)+1)<<8)|*(BYTE*)(ptr)) |
#define | LD_WORD(ptr) (WORD)(((WORD)*((BYTE*)(ptr)+1)<<8)|(WORD)*(BYTE*)(ptr)) |
#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) |
#define | ST_WORD(ptr, val) *(BYTE*)(ptr)=(BYTE)(val); *((BYTE*)(ptr)+1)=(BYTE)((WORD)(val)>>8) |
Typedefs | |
typedef char | TCHAR |
Functions | |
FRESULT | f_chdir (const TCHAR *path) |
FRESULT | f_chdrive (BYTE drv) |
FRESULT | f_chmod (const TCHAR *path, BYTE value, BYTE mask) |
FRESULT | f_close (FIL *fp) |
FRESULT | f_fdisk (BYTE pdrv, const DWORD szt[], void *work) |
FRESULT | f_forward (FIL *fp, UINT(*func)(const BYTE *, UINT), UINT btf, UINT *bf) |
FRESULT | f_getcwd (TCHAR *buff, UINT len) |
FRESULT | f_getfree (const TCHAR *path, DWORD *nclst, FATFS **fatfs) |
FRESULT | f_getlabel (const TCHAR *path, TCHAR *label, DWORD *sn) |
TCHAR * | f_gets (TCHAR *buff, int len, FIL *fp) |
FRESULT | f_lseek (FIL *fp, DWORD ofs) |
FRESULT | f_mkdir (const TCHAR *path) |
FRESULT | f_mkfs (BYTE vol, BYTE sfd, UINT au) |
FRESULT | f_mount (BYTE vol, FATFS *fs) |
FRESULT | f_open (FIL *fp, const TCHAR *path, BYTE mode) |
FRESULT | f_opendir (DIR *dj, const TCHAR *path) |
int | f_printf (FIL *fp, const TCHAR *str,...) |
int | f_putc (TCHAR c, FIL *fp) |
int | f_puts (const TCHAR *str, FIL *cp) |
FRESULT | f_read (FIL *fp, void *buff, UINT btr, UINT *br) |
FRESULT | f_readdir (DIR *dj, FILINFO *fno) |
FRESULT | f_rename (const TCHAR *path_old, const TCHAR *path_new) |
FRESULT | f_setlabel (const TCHAR *label) |
FRESULT | f_stat (const TCHAR *path, FILINFO *fno) |
FRESULT | f_sync (FIL *fp) |
FRESULT | f_truncate (FIL *fp) |
FRESULT | f_unlink (const TCHAR *path) |
FRESULT | f_utime (const TCHAR *path, const FILINFO *fno) |
FRESULT | f_write (FIL *fp, const void *buff, UINT btw, UINT *bw) |
DWORD | get_fattime (void) |
#define AM_ARC 0x20 /* Archive */ |
Definition at line 312 of file ff.h.
Referenced by f_chmod(), f_rename(), and f_sync().
#define AM_DIR 0x10 /* Directory */ |
Definition at line 311 of file ff.h.
Referenced by f_mkdir(), f_open(), f_opendir(), f_rename(), f_unlink(), and follow_path().
#define AM_LFN 0x0F /* LFN entry */ |
Definition at line 310 of file ff.h.
Referenced by dir_find(), and dir_read().
#define AM_MASK 0x3F /* Mask of defined bits */ |
Definition at line 313 of file ff.h.
Referenced by dir_find(), and dir_read().
#define AM_RDO 0x01 /* Read only */ |
Definition at line 306 of file ff.h.
Referenced by f_chmod(), f_open(), and f_unlink().
#define AM_VOL 0x08 /* Volume label */ |
Definition at line 309 of file ff.h.
Referenced by dir_find(), and dir_read().
#define FA__DIRTY 0x40 |
#define FA__ERROR 0x80 |
#define FA__WRITTEN 0x20 |
#define FA_OPEN_EXISTING 0x00 |
Definition at line 284 of file ff.h.
Referenced by load_file_from_external_source_to().
#define FA_READ 0x01 |
Definition at line 283 of file ff.h.
Referenced by f_open(), f_read(), and load_file_from_external_source_to().
#define FA_WRITE 0x02 |
#define FS_FAT12 1 |
Definition at line 299 of file ff.h.
Referenced by chk_mounted(), f_getfree(), get_fat(), and put_fat().
#define FS_FAT16 2 |
Definition at line 300 of file ff.h.
Referenced by chk_mounted(), f_getfree(), get_fat(), and put_fat().
#define FS_FAT32 3 |
Definition at line 301 of file ff.h.
Referenced by chk_mounted(), dir_sdi(), f_getfree(), f_mkdir(), f_rename(), get_fat(), ld_clust(), put_fat(), and sync_fs().
#define LD2PD | ( | vol | ) | (BYTE)(vol) /* Each logical drive is bound to the same physical drive number */ |
Definition at line 45 of file ff.h.
Referenced by chk_mounted().
#define LD2PT | ( | vol | ) | 0 /* Always mounts the 1st partition or in SFD */ |
Definition at line 46 of file ff.h.
Referenced by chk_mounted().
#define LD_DWORD | ( | ptr | ) | (DWORD)(((DWORD)*((BYTE*)(ptr)+3)<<24)|((DWORD)*((BYTE*)(ptr)+2)<<16)|((WORD)*((BYTE*)(ptr)+1)<<8)|*(BYTE*)(ptr)) |
Definition at line 331 of file ff.h.
Referenced by check_fs(), chk_mounted(), f_getfree(), f_open(), get_fat(), get_fileinfo(), and put_fat().
Definition at line 330 of file ff.h.
Referenced by check_fs(), chk_mounted(), f_getfree(), get_fat(), get_fileinfo(), and ld_clust().
enum FRESULT |
Definition at line 3414 of file ff.c.
References _FS_RPATH, AM_ARC, AM_HID, AM_RDO, AM_SYS, chk_mounted(), DEF_NAMEBUF, DIR::dir, DIR_Attr, DIR::fn, follow_path(), FR_INVALID_NAME, FR_OK, FREE_BUF, DIR::fs, INIT_BUF, LEAVE_FF, NS, NS_DOT, sync_fs(), and FATFS::wflag.
Definition at line 2708 of file ff.c.
References f_sync(), FR_OK, FIL::fs, LEAVE_FF, and validate().
Referenced by load_file_from_external_source_to().
Definition at line 3157 of file ff.c.
References chk_mounted(), FATFS::fatbase, FR_DISK_ERR, FR_INT_ERR, FR_OK, FATFS::free_clust, FS_FAT12, FS_FAT16, FS_FAT32, FATFS::fs_type, FATFS::fsi_flag, get_fat(), LD_DWORD, LD_WORD, LEAVE_FF, move_window(), FATFS::n_fatent, SS, and FATFS::win.
Definition at line 2877 of file ff.c.
References _FS_READONLY, ABORT, FIL::buf, FIL::clust, clust2sect(), create_chain(), CREATE_LINKMAP, FATFS::csize, disk_read(), disk_write(), FATFS::drv, FIL::dsect, FA__DIRTY, FA__ERROR, FA__WRITTEN, FA_WRITE, FIL::flag, FIL::fptr, FR_DISK_ERR, FR_INT_ERR, FR_NOT_ENOUGH_CORE, FR_OK, FIL::fs, FIL::fsize, get_fat(), if(), LEAVE_FF, FATFS::n_fatent, RES_OK, FIL::sclust, SS, and validate().
Definition at line 3341 of file ff.c.
References _FS_RPATH, AM_DIR, chk_mounted(), clust2sect(), create_chain(), FATFS::csize, DEF_NAMEBUF, DIR::dir, DIR_Attr, DIR_Name, dir_register(), DIR_WrtTime, FATFS::dirbase, DIR::fn, follow_path(), FR_DENIED, FR_DISK_ERR, FR_EXIST, FR_INT_ERR, FR_INVALID_NAME, FR_NO_FILE, FR_OK, FREE_BUF, DIR::fs, FS_FAT32, FATFS::fs_type, get_fattime(), INIT_BUF, LEAVE_FF, mem_cpy(), mem_set(), NS, NS_DOT, remove_chain(), DIR::sclust, SS, st_clust(), ST_DWORD, sync_fs(), sync_window(), SZ_DIR, FATFS::wflag, FATFS::win, and FATFS::winsect.
Definition at line 2268 of file ff.c.
References _VOLUMES, FR_INT_ERR, FR_INVALID_DRIVE, FR_OK, and FATFS::fs_type.
Referenced by load_file_from_external_source_to().
Definition at line 2308 of file ff.c.
References AM_DIR, AM_RDO, chk_mounted(), DEF_NAMEBUF, DIR::dir, DIR_Attr, DIR_CrtTime, DIR_FileSize, FIL::dir_ptr, dir_register(), FIL::dir_sect, FIL::dsect, FA__WRITTEN, FA_CREATE_ALWAYS, FA_CREATE_NEW, FA_OPEN_ALWAYS, FA_READ, FA_WRITE, FIL::flag, follow_path(), FIL::fptr, FR_DENIED, FR_EXIST, FR_INT_ERR, FR_INVALID_NAME, FR_INVALID_OBJECT, FR_NO_FILE, FR_OK, FR_TOO_MANY_OPEN_FILES, FREE_BUF, FIL::fs, DIR::fs, FIL::fsize, get_fattime(), FATFS::id, FIL::id, INIT_BUF, FATFS::last_clust, ld_clust(), LD_DWORD, LEAVE_FF, move_window(), remove_chain(), FIL::sclust, st_clust(), ST_DWORD, FATFS::wflag, and FATFS::winsect.
Referenced by load_file_from_external_source_to().
Definition at line 3035 of file ff.c.
References AM_DIR, chk_mounted(), DEF_NAMEBUF, DIR::dir, DIR_Attr, dir_sdi(), follow_path(), FR_INVALID_OBJECT, FR_NO_FILE, FR_NO_PATH, FR_OK, FREE_BUF, DIR::fs, FATFS::id, DIR::id, INIT_BUF, ld_clust(), LEAVE_FF, and DIR::sclust.
Definition at line 2440 of file ff.c.
References ABORT, FIL::buf, FIL::clust, clust2sect(), FATFS::csize, disk_read(), disk_write(), FATFS::drv, FIL::dsect, FA__DIRTY, FA__ERROR, FA_READ, FIL::flag, FIL::fptr, FR_DENIED, FR_DISK_ERR, FR_INT_ERR, FR_OK, FIL::fs, FIL::fsize, get_fat(), LEAVE_FF, mem_cpy(), move_window(), RES_OK, FIL::sclust, SS, validate(), FATFS::wflag, FATFS::win, and FATFS::winsect.
Referenced by check_size_and_header(), and load_uboot_file().
Definition at line 3082 of file ff.c.
References DEF_NAMEBUF, dir_next(), dir_read(), dir_sdi(), FR_NO_FILE, FR_OK, FREE_BUF, DIR::fs, get_fileinfo(), INIT_BUF, LEAVE_FF, DIR::sect, and validate().
Definition at line 3497 of file ff.c.
References _FS_RPATH, AM_ARC, AM_DIR, chk_mounted(), clust2sect(), DEF_NAMEBUF, DIR::dir, DIR_Attr, dir_register(), dir_remove(), FATFS::dirbase, DIR::fn, follow_path(), FR_EXIST, FR_INT_ERR, FR_INVALID_NAME, FR_NO_FILE, FR_OK, FREE_BUF, DIR::fs, FS_FAT32, FATFS::fs_type, INIT_BUF, ld_clust(), LEAVE_FF, mem_cpy(), move_window(), NS, NS_DOT, DIR::sclust, st_clust(), sync_fs(), SZ_DIR, FATFS::wflag, and FATFS::win.
Definition at line 3124 of file ff.c.
References chk_mounted(), DEF_NAMEBUF, DIR::dir, follow_path(), FR_INVALID_NAME, FR_OK, FREE_BUF, DIR::fs, get_fileinfo(), INIT_BUF, and LEAVE_FF.
Definition at line 2660 of file ff.c.
References AM_ARC, FIL::buf, DIR_Attr, DIR_FileSize, DIR_LstAccDate, FIL::dir_ptr, FIL::dir_sect, DIR_WrtTime, disk_write(), FATFS::drv, FIL::dsect, FA__DIRTY, FA__WRITTEN, FIL::flag, FR_DISK_ERR, FR_OK, FIL::fs, FIL::fsize, get_fattime(), LEAVE_FF, move_window(), RES_OK, FIL::sclust, st_clust(), ST_DWORD, ST_WORD, sync_fs(), validate(), and FATFS::wflag.
Referenced by f_close().
Definition at line 3224 of file ff.c.
References FIL::clust, FA__ERROR, FA__WRITTEN, FA_WRITE, FIL::flag, FIL::fptr, FR_DENIED, FR_DISK_ERR, FR_INT_ERR, FR_OK, FIL::fs, FIL::fsize, get_fat(), LEAVE_FF, FATFS::n_fatent, put_fat(), remove_chain(), FIL::sclust, and validate().
Definition at line 3272 of file ff.c.
References _FS_RPATH, AM_DIR, AM_RDO, chk_mounted(), DEF_NAMEBUF, DIR::dir, DIR_Attr, dir_read(), dir_remove(), dir_sdi(), endif(), DIR::fn, follow_path(), FR_DENIED, FR_INT_ERR, FR_INVALID_NAME, FR_NO_FILE, FR_OK, FREE_BUF, DIR::fs, INIT_BUF, ld_clust(), LEAVE_FF, mem_cpy(), NS, NS_DOT, remove_chain(), DIR::sclust, and sync_fs().
Definition at line 3456 of file ff.c.
References _FS_RPATH, chk_mounted(), DEF_NAMEBUF, DIR::dir, DIR_WrtDate, DIR_WrtTime, FILINFO::fdate, DIR::fn, follow_path(), FR_INVALID_NAME, FR_OK, FREE_BUF, DIR::fs, FILINFO::ftime, INIT_BUF, LEAVE_FF, NS, NS_DOT, ST_WORD, sync_fs(), and FATFS::wflag.
Definition at line 2541 of file ff.c.
References ABORT, FIL::buf, FIL::clust, clust2sect(), create_chain(), FATFS::csize, disk_read(), disk_write(), FATFS::drv, FIL::dsect, FA__DIRTY, FA__ERROR, FA__WRITTEN, FA_WRITE, FIL::flag, FIL::fptr, FR_DENIED, FR_DISK_ERR, FR_INT_ERR, FR_OK, FIL::fs, FIL::fsize, LEAVE_FF, mem_cpy(), move_window(), RES_OK, FIL::sclust, SS, sync_window(), validate(), FATFS::wflag, FATFS::win, and FATFS::winsect.