Service of FatFS file system.
This service provides a generic FAT file system module for the ASF systems.
Macros | |
#define | _DF1S 0 |
#define | _EXCVT |
#define | ABORT(fs, res) { fp->flag |= FA__ERROR; LEAVE_FF(fs, res); } |
#define | BPB_BkBootSec 50 /* Offset of backup boot sectot (2) */ |
#define | BPB_BytsPerSec 11 /* Sector size [byte] (2) */ |
#define | BPB_ExtFlags 40 /* Extended flags (2) */ |
#define | BPB_FATSz16 22 /* FAT size [sector] (2) */ |
#define | BPB_FATSz32 36 /* FAT size [sector] (4) */ |
#define | BPB_FSInfo 48 /* Offset of FSInfo sector (2) */ |
#define | BPB_FSVer 42 /* File system version (2) */ |
#define | BPB_HiddSec 28 /* Number of special hidden sectors (4) */ |
#define | BPB_Media 21 /* Media descriptor (1) */ |
#define | BPB_NumFATs 16 /* Number of FAT copies (1) */ |
#define | BPB_NumHeads 26 /* Number of heads (2) */ |
#define | BPB_RootClus 44 /* Root dir first cluster (4) */ |
#define | BPB_RootEntCnt 17 /* Number of root dir entries for FAT12/16 (2) */ |
#define | BPB_RsvdSecCnt 14 /* Size of reserved area [sector] (2) */ |
#define | BPB_SecPerClus 13 /* Cluster size [sector] (1) */ |
#define | BPB_SecPerTrk 24 /* Track size [sector] (2) */ |
#define | BPB_TotSec16 19 /* Volume size [sector] (2) */ |
#define | BPB_TotSec32 32 /* Volume size [sector] (4) */ |
#define | BS_55AA 510 /* Boot sector signature (2) */ |
#define | BS_BootSig 38 /* Extended boot signature (1) */ |
#define | BS_BootSig32 66 /* Extended boot signature (1) */ |
#define | BS_DrvNum 36 /* Physical drive number (2) */ |
#define | BS_DrvNum32 64 /* Physical drive number (2) */ |
#define | BS_FilSysType 54 /* File system type (1) */ |
#define | BS_FilSysType32 82 /* File system type (1) */ |
#define | BS_jmpBoot 0 /* Jump instruction (3) */ |
#define | BS_OEMName 3 /* OEM name (8) */ |
#define | BS_VolID 39 /* Volume serial number (4) */ |
#define | BS_VolID32 67 /* Volume serial number (4) */ |
#define | BS_VolLab 43 /* Volume label (8) */ |
#define | BS_VolLab32 71 /* Volume label (8) */ |
#define | DDE 0xE5 /* Deleted directory enrty mark in DIR_Name[0] */ |
#define | DEF_NAMEBUF BYTE sfn[12]; WCHAR lbuf[_MAX_LFN+1] |
#define | DIR_Attr 11 /* Attribute (1) */ |
#define | DIR_CrtDate 16 /* Created date (2) */ |
#define | DIR_CrtTime 14 /* Created time (2) */ |
#define | DIR_FileSize 28 /* File size (4) */ |
#define | DIR_FstClusHI 20 /* Higher 16-bit of first cluster (2) */ |
#define | DIR_FstClusLO 26 /* Lower 16-bit of first cluster (2) */ |
#define | DIR_Name 0 /* Short file name (11) */ |
#define | DIR_NTres 12 /* NT flag (1) */ |
#define | DIR_WrtDate 24 /* Modified date (2) */ |
#define | DIR_WrtTime 22 /* Modified time (2) */ |
#define | ENTER_FF(fs) |
#define | FREE_BUF() |
#define | FSI_Free_Count 488 /* FSI: Number of free clusters (4) */ |
#define | FSI_LeadSig 0 /* FSI: Leading signature (4) */ |
#define | FSI_Nxt_Free 492 /* FSI: Last allocated cluster (4) */ |
#define | FSI_StrucSig 484 /* FSI: Structure signature (4) */ |
#define | INIT_BUF(dobj) { (dobj).fn = sfn; (dobj).lfn = lbuf; } |
#define | IsDBCS1(c) 0 |
#define | IsDBCS2(c) 0 |
#define | IsDigit(c) (((c)>='0')&&((c)<='9')) |
#define | IsLower(c) (((c)>='a')&&((c)<='z')) |
#define | IsUpper(c) (((c)>='A')&&((c)<='Z')) |
#define | LD_CLUST(dir) (((DWORD)LD_WORD(dir+DIR_FstClusHI)<<16) | LD_WORD(dir+DIR_FstClusLO)) |
#define | LDIR_Attr 11 /* LFN attribute (1) */ |
#define | LDIR_Chksum 13 /* Sum of corresponding SFN entry */ |
#define | LDIR_FstClusLO 26 /* Filled by zero (0) */ |
#define | LDIR_Ord 0 /* LFN entry order and LLE flag (1) */ |
#define | LDIR_Type 12 /* LFN type (1) */ |
#define | LEAVE_FF(fs, res) return res |
#define | LLE 0x40 /* Last long entry flag in LDIR_Ord */ |
#define | MBR_Table 446 /* MBR: Partition table offset (2) */ |
#define | MIN_FAT16 4086 /* Minimum number of clusters for FAT16 */ |
#define | MIN_FAT32 65526 /* Minimum number of clusters for FAT32 */ |
#define | N_FATS 1 /* Number of FAT copies (1 or 2) */ |
#define | N_ROOTDIR 512 /* Number of root dir entries for FAT12/16 */ |
#define | NDDE 0x05 /* Replacement of a character collides with DDE */ |
#define | NS 11 /* Index of name status byte in fn[] */ |
#define | NS_BODY 0x08 /* Lower case flag (body) */ |
#define | NS_DOT 0x20 /* Dot entry */ |
#define | NS_EXT 0x10 /* Lower case flag (ext) */ |
#define | NS_LAST 0x04 /* Last segment */ |
#define | NS_LFN 0x02 /* Force to create LFN entry */ |
#define | NS_LOSS 0x01 /* Out of 8.3 format */ |
#define | SS(fs) 512U /* Fixed sector size */ |
#define | ST_CLUST(dir, cl) {ST_WORD(dir+DIR_FstClusLO, cl); ST_WORD(dir+DIR_FstClusHI, (DWORD)cl>>16);} |
#define | SZ_DIR 32 /* Size of a directory entry */ |
#define | SZ_PTE 16 /* MBR: Size of a partition table entry */ |
Functions | |
static BYTE | check_fs (FATFS *fs, DWORD sect) |
static int | chk_chr (const char *str, int chr) |
static FRESULT | chk_mounted (const TCHAR **path, FATFS **rfs, BYTE chk_wp) |
static DWORD | clust2sect (FATFS *fs, DWORD clst) |
static int | cmp_lfn (WCHAR *lfnbuf, BYTE *dir) |
static DWORD | create_chain (FATFS *fs, DWORD clst) |
static FRESULT | create_name (DIR *dj, const TCHAR **path) |
static FRESULT | dir_find (DIR *dj) |
static FRESULT | dir_next (DIR *dj, int stretch) |
static FRESULT | dir_read (DIR *dj) |
static FRESULT | dir_register (DIR *dj) |
static FRESULT | dir_remove (DIR *dj) |
static FRESULT | dir_sdi (DIR *dj, WORD idx) |
FRESULT | f_chmod (const TCHAR *path, BYTE value, BYTE mask) |
FRESULT | f_close (FIL *fp) |
FRESULT | f_getfree (const TCHAR *path, DWORD *nclst, FATFS **fatfs) |
TCHAR * | f_gets (TCHAR *buff, int len, FIL *fil) |
FRESULT | f_lseek (FIL *fp, DWORD ofs) |
FRESULT | f_mkdir (const TCHAR *path) |
FRESULT | f_mkfs (BYTE drv, 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 *fil, const TCHAR *str,...) |
int | f_putc (TCHAR c, FIL *fil) |
int | f_puts (const TCHAR *str, FIL *fil) |
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_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) |
static void | fit_lfn (const WCHAR *lfnbuf, BYTE *dir, BYTE ord, BYTE sum) |
static FRESULT | follow_path (DIR *dj, const TCHAR *path) |
static void | gen_numname (BYTE *dst, const BYTE *src, const WCHAR *lfn, WORD seq) |
static DWORD | get_fat (FATFS *fs, DWORD clst) |
static void | get_fileinfo (DIR *dj, FILINFO *fno) |
static int | mem_cmp (const void *dst, const void *src, UINT cnt) |
static void | mem_cpy (void *dst, const void *src, UINT cnt) |
static void | mem_set (void *dst, int val, UINT cnt) |
static FRESULT | move_window (FATFS *fs, DWORD sector) |
static int | pick_lfn (WCHAR *lfnbuf, BYTE *dir) |
static FRESULT | put_fat (FATFS *fs, DWORD clst, DWORD val) |
static FRESULT | remove_chain (FATFS *fs, DWORD clst) |
static BYTE | sum_sfn (const BYTE *dir) |
static FRESULT | sync (FATFS *fs) |
static FRESULT | validate (FATFS *fs, WORD id) |
Variables | |
static FATFS * | FatFs [_VOLUMES] |
static WORD | Fsid |
static const BYTE | LfnOfs [] = {1,3,5,7,9,14,16,18,20,22,24,28,30} |
#define _DF1S 0 |
Referenced by create_name(), and get_fileinfo().
#define _EXCVT |
Referenced by create_name().
#define BPB_BkBootSec 50 /* Offset of backup boot sectot (2) */ |
Referenced by f_mkfs().
#define BPB_BytsPerSec 11 /* Sector size [byte] (2) */ |
Referenced by chk_mounted(), and f_mkfs().
#define BPB_ExtFlags 40 /* Extended flags (2) */ |
#define BPB_FATSz16 22 /* FAT size [sector] (2) */ |
Referenced by chk_mounted(), and f_mkfs().
#define BPB_FATSz32 36 /* FAT size [sector] (4) */ |
Referenced by chk_mounted(), and f_mkfs().
#define BPB_FSInfo 48 /* Offset of FSInfo sector (2) */ |
Referenced by chk_mounted(), and f_mkfs().
#define BPB_FSVer 42 /* File system version (2) */ |
#define BPB_HiddSec 28 /* Number of special hidden sectors (4) */ |
Referenced by f_mkfs().
#define BPB_Media 21 /* Media descriptor (1) */ |
Referenced by f_mkfs().
#define BPB_NumFATs 16 /* Number of FAT copies (1) */ |
Referenced by chk_mounted(), and f_mkfs().
#define BPB_NumHeads 26 /* Number of heads (2) */ |
Referenced by f_mkfs().
#define BPB_RootClus 44 /* Root dir first cluster (4) */ |
Referenced by chk_mounted(), and f_mkfs().
#define BPB_RootEntCnt 17 /* Number of root dir entries for FAT12/16 (2) */ |
Referenced by chk_mounted(), and f_mkfs().
#define BPB_RsvdSecCnt 14 /* Size of reserved area [sector] (2) */ |
Referenced by chk_mounted(), and f_mkfs().
#define BPB_SecPerClus 13 /* Cluster size [sector] (1) */ |
Referenced by chk_mounted(), and f_mkfs().
#define BPB_SecPerTrk 24 /* Track size [sector] (2) */ |
Referenced by f_mkfs().
#define BPB_TotSec16 19 /* Volume size [sector] (2) */ |
Referenced by chk_mounted(), and f_mkfs().
#define BPB_TotSec32 32 /* Volume size [sector] (4) */ |
Referenced by chk_mounted(), and f_mkfs().
#define BS_55AA 510 /* Boot sector signature (2) */ |
Referenced by check_fs(), chk_mounted(), f_mkfs(), and sync().
#define BS_BootSig 38 /* Extended boot signature (1) */ |
Referenced by f_mkfs().
#define BS_BootSig32 66 /* Extended boot signature (1) */ |
Referenced by f_mkfs().
#define BS_DrvNum 36 /* Physical drive number (2) */ |
Referenced by f_mkfs().
#define BS_DrvNum32 64 /* Physical drive number (2) */ |
Referenced by f_mkfs().
#define BS_FilSysType 54 /* File system type (1) */ |
Referenced by check_fs().
#define BS_FilSysType32 82 /* File system type (1) */ |
Referenced by check_fs().
#define BS_jmpBoot 0 /* Jump instruction (3) */ |
#define BS_OEMName 3 /* OEM name (8) */ |
#define BS_VolID 39 /* Volume serial number (4) */ |
Referenced by f_mkfs().
#define BS_VolID32 67 /* Volume serial number (4) */ |
Referenced by f_mkfs().
#define BS_VolLab 43 /* Volume label (8) */ |
Referenced by f_mkfs().
#define BS_VolLab32 71 /* Volume label (8) */ |
Referenced by f_mkfs().
#define DDE 0xE5 /* Deleted directory enrty mark in DIR_Name[0] */ |
Referenced by create_name(), dir_find(), dir_read(), dir_register(), dir_remove(), and get_fileinfo().
Referenced by f_chmod(), f_mkdir(), f_open(), f_opendir(), f_readdir(), f_rename(), f_stat(), f_unlink(), and f_utime().
#define DIR_Attr 11 /* Attribute (1) */ |
Referenced by dir_find(), dir_read(), f_chmod(), f_mkdir(), f_open(), f_opendir(), f_rename(), f_sync(), f_unlink(), follow_path(), and get_fileinfo().
#define DIR_CrtDate 16 /* Created date (2) */ |
#define DIR_CrtTime 14 /* Created time (2) */ |
Referenced by f_open().
#define DIR_FileSize 28 /* File size (4) */ |
Referenced by f_open(), f_sync(), and get_fileinfo().
#define DIR_FstClusHI 20 /* Higher 16-bit of first cluster (2) */ |
#define DIR_FstClusLO 26 /* Lower 16-bit of first cluster (2) */ |
#define DIR_Name 0 /* Short file name (11) */ |
Referenced by dir_find(), dir_read(), and f_mkdir().
#define DIR_NTres 12 /* NT flag (1) */ |
Referenced by dir_register(), and get_fileinfo().
#define DIR_WrtDate 24 /* Modified date (2) */ |
Referenced by f_utime(), and get_fileinfo().
#define DIR_WrtTime 22 /* Modified time (2) */ |
Referenced by f_mkdir(), f_sync(), f_utime(), and get_fileinfo().
#define ENTER_FF | ( | fs | ) |
Referenced by chk_mounted(), and validate().
#define FREE_BUF | ( | ) |
Referenced by f_chmod(), f_mkdir(), f_open(), f_opendir(), f_readdir(), f_rename(), f_stat(), f_unlink(), and f_utime().
#define FSI_Free_Count 488 /* FSI: Number of free clusters (4) */ |
Referenced by chk_mounted(), f_mkfs(), and sync().
#define FSI_LeadSig 0 /* FSI: Leading signature (4) */ |
Referenced by chk_mounted(), f_mkfs(), and sync().
#define FSI_Nxt_Free 492 /* FSI: Last allocated cluster (4) */ |
Referenced by chk_mounted(), f_mkfs(), and sync().
#define FSI_StrucSig 484 /* FSI: Structure signature (4) */ |
Referenced by chk_mounted(), f_mkfs(), and sync().
#define INIT_BUF | ( | dobj | ) | { (dobj).fn = sfn; (dobj).lfn = lbuf; } |
Referenced by f_chmod(), f_mkdir(), f_open(), f_opendir(), f_readdir(), f_rename(), f_stat(), f_unlink(), and f_utime().
#define IsDBCS1 | ( | c | ) | 0 |
Referenced by create_name(), gen_numname(), and get_fileinfo().
#define IsDBCS2 | ( | c | ) | 0 |
Referenced by create_name(), and get_fileinfo().
#define IsDigit | ( | c | ) | (((c)>='0')&&((c)<='9')) |
Referenced by f_printf().
#define IsLower | ( | c | ) | (((c)>='a')&&((c)<='z')) |
Referenced by create_name(), and f_printf().
#define IsUpper | ( | c | ) | (((c)>='A')&&((c)<='Z')) |
Referenced by create_name(), and get_fileinfo().
#define LD_CLUST | ( | dir | ) | (((DWORD)LD_WORD(dir+DIR_FstClusHI)<<16) | LD_WORD(dir+DIR_FstClusLO)) |
Referenced by f_open(), f_opendir(), f_rename(), f_unlink(), and follow_path().
#define LDIR_Attr 11 /* LFN attribute (1) */ |
Referenced by fit_lfn().
#define LDIR_Chksum 13 /* Sum of corresponding SFN entry */ |
Referenced by dir_find(), dir_read(), and fit_lfn().
#define LDIR_FstClusLO 26 /* Filled by zero (0) */ |
Referenced by fit_lfn().
#define LDIR_Ord 0 /* LFN entry order and LLE flag (1) */ |
Referenced by cmp_lfn(), fit_lfn(), and pick_lfn().
#define LDIR_Type 12 /* LFN type (1) */ |
Referenced by fit_lfn().
#define LEAVE_FF | ( | fs, | |
res | |||
) | return res |
Referenced by f_chmod(), f_close(), f_getfree(), f_lseek(), f_mkdir(), f_open(), f_opendir(), f_read(), f_readdir(), f_rename(), f_stat(), f_sync(), f_truncate(), f_unlink(), f_utime(), and f_write().
#define LLE 0x40 /* Last long entry flag in LDIR_Ord */ |
Referenced by cmp_lfn(), dir_find(), dir_read(), fit_lfn(), and pick_lfn().
#define MBR_Table 446 /* MBR: Partition table offset (2) */ |
Referenced by chk_mounted(), and f_mkfs().
#define MIN_FAT16 4086 /* Minimum number of clusters for FAT16 */ |
Referenced by chk_mounted(), and f_mkfs().
#define MIN_FAT32 65526 /* Minimum number of clusters for FAT32 */ |
Referenced by chk_mounted(), and f_mkfs().
#define N_FATS 1 /* Number of FAT copies (1 or 2) */ |
Referenced by f_mkfs().
#define N_ROOTDIR 512 /* Number of root dir entries for FAT12/16 */ |
Referenced by f_mkfs().
#define NDDE 0x05 /* Replacement of a character collides with DDE */ |
Referenced by create_name(), and get_fileinfo().
#define NS 11 /* Index of name status byte in fn[] */ |
Referenced by create_name(), dir_find(), dir_register(), f_chmod(), f_mkdir(), f_rename(), f_unlink(), f_utime(), and follow_path().
#define NS_BODY 0x08 /* Lower case flag (body) */ |
Referenced by create_name(), dir_register(), and get_fileinfo().
#define NS_DOT 0x20 /* Dot entry */ |
Referenced by create_name(), dir_register(), f_chmod(), f_mkdir(), f_rename(), f_unlink(), f_utime(), and follow_path().
#define NS_EXT 0x10 /* Lower case flag (ext) */ |
Referenced by create_name(), dir_register(), and get_fileinfo().
#define NS_LAST 0x04 /* Last segment */ |
Referenced by create_name(), and follow_path().
#define NS_LFN 0x02 /* Force to create LFN entry */ |
Referenced by create_name(), and dir_register().
#define NS_LOSS 0x01 /* Out of 8.3 format */ |
Referenced by create_name(), dir_find(), and dir_register().
#define SS | ( | fs | ) | 512U /* Fixed sector size */ |
Referenced by chk_mounted(), dir_next(), dir_sdi(), f_getfree(), f_lseek(), f_mkdir(), f_mkfs(), f_read(), f_write(), get_fat(), and put_fat().
#define ST_CLUST | ( | dir, | |
cl | |||
) | {ST_WORD(dir+DIR_FstClusLO, cl); ST_WORD(dir+DIR_FstClusHI, (DWORD)cl>>16);} |
Referenced by f_mkdir(), f_open(), f_rename(), and f_sync().
#define SZ_DIR 32 /* Size of a directory entry */ |
Referenced by chk_mounted(), dir_next(), dir_register(), dir_sdi(), f_mkdir(), f_mkfs(), and f_rename().
#define SZ_PTE 16 /* MBR: Size of a partition table entry */ |
Referenced by chk_mounted(), and f_mkfs().
References BS_55AA, BS_FilSysType, BS_FilSysType32, disk_read(), FATFS::drv, LD_DWORD, LD_WORD, RES_OK, and FATFS::win.
Referenced by chk_mounted().
|
static |
Referenced by create_name().
References _FS_READONLY, _VOLUMES, BPB_BytsPerSec, BPB_FATSz16, BPB_FATSz32, BPB_FSInfo, BPB_NumFATs, BPB_RootClus, BPB_RootEntCnt, BPB_RsvdSecCnt, BPB_SecPerClus, BPB_TotSec16, BPB_TotSec32, BS_55AA, check_fs(), FATFS::csize, FATFS::database, FATFS::dirbase, disk_initialize(), disk_ioctl(), disk_read(), disk_status(), FATFS::drv, ENTER_FF, FATFS::fatbase, FR_DISK_ERR, FR_INVALID_DRIVE, FR_NO_FILESYSTEM, FR_NOT_ENABLED, FR_NOT_READY, FR_OK, FR_WRITE_PROTECTED, FATFS::free_clust, fs, FS_FAT12, FS_FAT16, FS_FAT32, FATFS::fs_type, FATFS::fsi_flag, FSI_Free_Count, FSI_LeadSig, FSI_Nxt_Free, FATFS::fsi_sector, FSI_StrucSig, Fsid, FATFS::fsize, GET_SECTOR_SIZE, FATFS::id, FATFS::last_clust, LD2PD, LD2PT, LD_DWORD, LD_WORD, MBR_Table, MIN_FAT16, MIN_FAT32, FATFS::n_fatent, FATFS::n_fats, FATFS::n_rootdir, RES_OK, SS, STA_NOINIT, STA_PROTECT, SZ_DIR, SZ_PTE, FATFS::wflag, FATFS::win, and FATFS::winsect.
Referenced by f_chmod(), f_getfree(), f_mkdir(), f_open(), f_opendir(), f_rename(), f_stat(), f_unlink(), and f_utime().
References FATFS::csize, FATFS::database, and FATFS::n_fatent.
Referenced by dir_next(), dir_sdi(), f_lseek(), f_mkdir(), f_read(), f_rename(), f_write(), and remove_chain().
References _MAX_LFN, ff_wtoupper(), LD_WORD, LDIR_Ord, and LLE.
Referenced by dir_find().
References FR_DISK_ERR, FR_OK, FATFS::free_clust, FATFS::fsi_flag, get_fat(), FATFS::last_clust, FATFS::n_fatent, and put_fat().
Referenced by dir_next(), f_lseek(), f_mkdir(), and f_write().
References AM_LFN, AM_MASK, AM_VOL, cmp_lfn(), DDE, DIR::dir, DIR_Attr, DIR_Name, dir_next(), dir_sdi(), DIR::fn, FR_NO_FILE, FR_OK, DIR::fs, DIR::index, LDIR_Chksum, DIR::lfn, DIR::lfn_idx, LLE, mem_cmp(), move_window(), NS, NS_LOSS, DIR::sect, and sum_sfn().
Referenced by dir_register(), and follow_path().
References DIR::clust, clust2sect(), create_chain(), FATFS::csize, DIR::dir, FR_DENIED, FR_DISK_ERR, FR_INT_ERR, FR_NO_FILE, FR_OK, DIR::fs, get_fat(), DIR::index, mem_set(), move_window(), FATFS::n_fatent, FATFS::n_rootdir, DIR::sect, SS, SZ_DIR, FATFS::wflag, FATFS::win, and FATFS::winsect.
Referenced by dir_find(), dir_read(), dir_register(), dir_remove(), and f_readdir().
References _FS_RPATH, AM_LFN, AM_MASK, AM_VOL, DDE, DIR::dir, DIR_Attr, DIR_Name, dir_next(), FR_NO_FILE, FR_OK, DIR::fs, DIR::index, LDIR_Chksum, DIR::lfn, DIR::lfn_idx, LLE, move_window(), pick_lfn(), DIR::sect, and sum_sfn().
Referenced by f_readdir(), and f_unlink().
References _FS_RPATH, DDE, DIR::dir, dir_find(), dir_next(), DIR_NTres, dir_sdi(), fit_lfn(), DIR::fn, FR_DENIED, FR_INVALID_NAME, FR_NO_FILE, FR_OK, DIR::fs, gen_numname(), DIR::index, DIR::lfn, mem_cpy(), mem_set(), move_window(), NS, NS_BODY, NS_DOT, NS_EXT, NS_LFN, NS_LOSS, DIR::sect, sum_sfn(), SZ_DIR, and FATFS::wflag.
Referenced by f_mkdir(), f_open(), and f_rename().
References DDE, DIR::dir, dir_next(), dir_sdi(), FR_INT_ERR, FR_NO_FILE, FR_OK, DIR::fs, DIR::index, DIR::lfn_idx, move_window(), DIR::sect, and FATFS::wflag.
Referenced by f_rename(), and f_unlink().
References DIR::clust, clust2sect(), FATFS::csize, DIR::dir, FATFS::dirbase, FR_DISK_ERR, FR_INT_ERR, FR_OK, DIR::fs, FS_FAT32, FATFS::fs_type, get_fat(), DIR::index, FATFS::n_fatent, FATFS::n_rootdir, DIR::sclust, DIR::sect, SS, SZ_DIR, and FATFS::win.
Referenced by dir_find(), dir_register(), dir_remove(), f_opendir(), f_readdir(), f_unlink(), and follow_path().
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(), and FATFS::wflag.
References chk_mounted(), FR_DISK_ERR, FR_INT_ERR, FR_OK, FS_FAT12, FS_FAT16, FS_FAT32, get_fat(), LD_DWORD, LD_WORD, LEAVE_FF, move_window(), and SS.
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(), FIL::id, LEAVE_FF, FATFS::n_fatent, RES_OK, FIL::sclust, SS, and validate().
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(), move_window(), NS, NS_DOT, remove_chain(), DIR::sclust, SS, ST_CLUST, ST_DWORD, sync(), SZ_DIR, FATFS::wflag, FATFS::win, and FATFS::winsect.
References _MAX_SS, _MULTI_PARTITION, _VOLUMES, BPB_BkBootSec, BPB_BytsPerSec, BPB_FATSz16, BPB_FATSz32, BPB_FSInfo, BPB_HiddSec, BPB_Media, BPB_NumFATs, BPB_NumHeads, BPB_RootClus, BPB_RootEntCnt, BPB_RsvdSecCnt, BPB_SecPerClus, BPB_SecPerTrk, BPB_TotSec16, BPB_TotSec32, BS_55AA, BS_BootSig, BS_BootSig32, BS_DrvNum, BS_DrvNum32, BS_VolID, BS_VolID32, BS_VolLab, BS_VolLab32, CTRL_ERASE_SECTOR, CTRL_SYNC, disk_initialize(), disk_ioctl(), disk_read(), disk_write(), FR_DISK_ERR, FR_INVALID_DRIVE, FR_INVALID_PARAMETER, FR_MKFS_ABORTED, FR_NOT_ENABLED, FR_NOT_READY, FR_OK, FR_WRITE_PROTECTED, fs, FS_FAT12, FS_FAT16, FS_FAT32, FATFS::fs_type, FSI_Free_Count, FSI_LeadSig, FSI_Nxt_Free, FSI_StrucSig, GET_BLOCK_SIZE, get_fattime(), GET_SECTOR_COUNT, GET_SECTOR_SIZE, LD2PD, LD2PT, LD_DWORD, LD_WORD, MBR_Table, mem_cpy(), mem_set(), MIN_FAT16, MIN_FAT32, N_FATS, N_ROOTDIR, RES_OK, SS, ST_DWORD, ST_WORD, STA_NOINIT, STA_PROTECT, SZ_DIR, SZ_PTE, and FATFS::win.
References _VOLUMES, FR_INT_ERR, FR_INVALID_DRIVE, FR_OK, fs, and FATFS::fs_type.
Referenced by main().
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_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 main().
References AM_DIR, chk_mounted(), DEF_NAMEBUF, DIR::dir, DIR_Attr, dir_sdi(), follow_path(), 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.
Referenced by f_printf(), and main().
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(), FIL::id, LEAVE_FF, mem_cpy(), move_window(), RES_OK, FIL::sclust, SS, validate(), FATFS::wflag, FATFS::win, and FATFS::winsect.
Referenced by f_gets().
References DEF_NAMEBUF, dir_next(), dir_read(), dir_sdi(), FR_NO_FILE, FR_OK, FREE_BUF, DIR::fs, get_fileinfo(), DIR::id, INIT_BUF, LEAVE_FF, DIR::sect, and validate().
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(), SZ_DIR, FATFS::wflag, and FATFS::win.
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.
References AM_ARC, FIL::buf, DIR_Attr, DIR_FileSize, 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(), FIL::id, LEAVE_FF, move_window(), RES_OK, FIL::sclust, ST_CLUST, ST_DWORD, sync(), validate(), and FATFS::wflag.
Referenced by f_close().
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(), FIL::id, LEAVE_FF, FATFS::n_fatent, put_fat(), remove_chain(), FIL::sclust, and validate().
References _FS_RPATH, AM_DIR, AM_RDO, chk_mounted(), DEF_NAMEBUF, DIR::dir, DIR_Attr, dir_read(), dir_remove(), dir_sdi(), 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().
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(), and FATFS::wflag.
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, FIL::id, LEAVE_FF, mem_cpy(), move_window(), RES_OK, FIL::sclust, SS, validate(), FATFS::wflag, FATFS::win, and FATFS::winsect.
Referenced by f_putc().
References AM_LFN, LDIR_Attr, LDIR_Chksum, LDIR_FstClusLO, LDIR_Ord, LDIR_Type, LLE, and ST_WORD.
Referenced by dir_register().
References _FS_RPATH, AM_DIR, create_name(), DIR::dir, DIR_Attr, dir_find(), dir_sdi(), DIR::fn, FR_NO_FILE, FR_NO_PATH, FR_OK, DIR::fs, LD_CLUST, NS, NS_DOT, NS_LAST, and DIR::sclust.
Referenced by f_chmod(), f_mkdir(), f_open(), f_opendir(), f_rename(), f_stat(), f_unlink(), and f_utime().
References IsDBCS1, and mem_cpy().
Referenced by dir_register().
References FATFS::fatbase, FS_FAT12, FS_FAT16, FS_FAT32, FATFS::fs_type, LD_DWORD, LD_WORD, move_window(), FATFS::n_fatent, SS, and FATFS::win.
Referenced by create_chain(), dir_next(), dir_sdi(), f_getfree(), f_lseek(), f_read(), f_truncate(), and remove_chain().
References _DF1S, _USE_LFN, DDE, DIR::dir, DIR_Attr, DIR_FileSize, DIR_NTres, DIR_WrtDate, DIR_WrtTime, FILINFO::fattrib, FILINFO::fdate, ff_convert(), FILINFO::fname, FILINFO::fsize, FILINFO::ftime, IsDBCS1, IsDBCS2, IsUpper, LD_DWORD, LD_WORD, DIR::lfn, DIR::lfn_idx, FILINFO::lfname, FILINFO::lfsize, NDDE, NS_BODY, NS_EXT, and DIR::sect.
Referenced by f_readdir(), and f_stat().
|
static |
Referenced by dir_find().
|
static |
Referenced by dir_register(), f_mkdir(), f_mkfs(), f_read(), f_rename(), f_unlink(), f_write(), and gen_numname().
|
static |
Referenced by create_name(), dir_next(), dir_register(), f_mkdir(), f_mkfs(), and sync().
References disk_read(), disk_write(), FATFS::drv, FATFS::fatbase, FR_DISK_ERR, FR_OK, FATFS::fsize, FATFS::n_fats, RES_OK, FATFS::wflag, FATFS::win, and FATFS::winsect.
Referenced by dir_find(), dir_next(), dir_read(), dir_register(), dir_remove(), f_getfree(), f_mkdir(), f_open(), f_read(), f_rename(), f_sync(), f_write(), get_fat(), put_fat(), and sync().
References _MAX_LFN, LD_WORD, LDIR_Ord, and LLE.
Referenced by dir_read().
References FATFS::fatbase, FR_INT_ERR, FR_OK, FS_FAT12, FS_FAT16, FS_FAT32, FATFS::fs_type, LD_DWORD, move_window(), FATFS::n_fatent, SS, ST_DWORD, ST_WORD, FATFS::wflag, and FATFS::win.
Referenced by create_chain(), f_truncate(), and remove_chain().
References clust2sect(), FATFS::csize, CTRL_ERASE_SECTOR, disk_ioctl(), FATFS::drv, FR_DISK_ERR, FR_INT_ERR, FR_OK, FATFS::free_clust, FATFS::fsi_flag, get_fat(), FATFS::n_fatent, and put_fat().
Referenced by f_mkdir(), f_open(), f_truncate(), and f_unlink().
Referenced by dir_find(), dir_read(), and dir_register().
References BS_55AA, CTRL_SYNC, disk_ioctl(), disk_write(), FATFS::drv, FR_DISK_ERR, FR_OK, FATFS::free_clust, FS_FAT32, FATFS::fs_type, FATFS::fsi_flag, FSI_Free_Count, FSI_LeadSig, FSI_Nxt_Free, FATFS::fsi_sector, FSI_StrucSig, FATFS::last_clust, mem_set(), move_window(), RES_OK, ST_DWORD, ST_WORD, FATFS::win, and FATFS::winsect.
Referenced by f_chmod(), f_mkdir(), f_rename(), f_sync(), f_unlink(), and f_utime().
References disk_status(), FATFS::drv, ENTER_FF, FR_INVALID_OBJECT, FR_NOT_READY, FR_OK, FATFS::fs_type, FATFS::id, and STA_NOINIT.
Referenced by f_close(), f_lseek(), f_read(), f_readdir(), f_sync(), f_truncate(), and f_write().
|
static |
Referenced by chk_mounted().
|
static |