|
CircleOS
1
|
Go to the source code of this file.
Macros | |
| #define | SS(fs) ((fs)->ssize) /* Multiple sector size */ |
| #define | ENTER_FF(fs) |
| #define | LEAVE_FF(fs, res) return res |
| #define | ABORT(fs, res) { fp->flag |= FA__ERROR; LEAVE_FF(fs, res); } |
| #define | LD_CLUST(dir) (((DWORD)LD_WORD(dir+DIR_FstClusHI)<<16) | LD_WORD(dir+DIR_FstClusLO)) |
| #define | ST_CLUST(dir, cl) {ST_WORD(dir+DIR_FstClusLO, cl); ST_WORD(dir+DIR_FstClusHI, (DWORD)cl>>16);} |
| #define | IsUpper(c) (((c)>='A')&&((c)<='Z')) |
| #define | IsLower(c) (((c)>='a')&&((c)<='z')) |
| #define | IsDigit(c) (((c)>='0')&&((c)<='9')) |
| #define | IsDBCS1(c) 0 |
| #define | IsDBCS2(c) 0 |
| #define | NS 11 /* Offset of name status byte */ |
| #define | NS_LOSS 0x01 /* Out of 8.3 format */ |
| #define | NS_LFN 0x02 /* Force to create LFN entry */ |
| #define | NS_LAST 0x04 /* Last segment */ |
| #define | NS_BODY 0x08 /* Lower case flag (body) */ |
| #define | NS_EXT 0x10 /* Lower case flag (ext) */ |
| #define | NS_DOT 0x20 /* Dot entry */ |
| #define | MIN_FAT16 4086 /* Minimum number of clusters for FAT16 */ |
| #define | MIN_FAT32 65526 /* Minimum number of clusters for FAT32 */ |
| #define | BS_jmpBoot 0 |
| #define | BS_OEMName 3 |
| #define | BPB_BytsPerSec 11 |
| #define | BPB_SecPerClus 13 |
| #define | BPB_RsvdSecCnt 14 |
| #define | BPB_NumFATs 16 |
| #define | BPB_RootEntCnt 17 |
| #define | BPB_TotSec16 19 |
| #define | BPB_Media 21 |
| #define | BPB_FATSz16 22 |
| #define | BPB_SecPerTrk 24 |
| #define | BPB_NumHeads 26 |
| #define | BPB_HiddSec 28 |
| #define | BPB_TotSec32 32 |
| #define | BS_DrvNum 36 |
| #define | BS_BootSig 38 |
| #define | BS_VolID 39 |
| #define | BS_VolLab 43 |
| #define | BS_FilSysType 54 |
| #define | BPB_FATSz32 36 |
| #define | BPB_ExtFlags 40 |
| #define | BPB_FSVer 42 |
| #define | BPB_RootClus 44 |
| #define | BPB_FSInfo 48 |
| #define | BPB_BkBootSec 50 |
| #define | BS_DrvNum32 64 |
| #define | BS_BootSig32 66 |
| #define | BS_VolID32 67 |
| #define | BS_VolLab32 71 |
| #define | BS_FilSysType32 82 |
| #define | FSI_LeadSig 0 |
| #define | FSI_StrucSig 484 |
| #define | FSI_Free_Count 488 |
| #define | FSI_Nxt_Free 492 |
| #define | MBR_Table 446 |
| #define | BS_55AA 510 |
| #define | DIR_Name 0 |
| #define | DIR_Attr 11 |
| #define | DIR_NTres 12 |
| #define | DIR_CrtTime 14 |
| #define | DIR_CrtDate 16 |
| #define | DIR_FstClusHI 20 |
| #define | DIR_WrtTime 22 |
| #define | DIR_WrtDate 24 |
| #define | DIR_FstClusLO 26 |
| #define | DIR_FileSize 28 |
| #define | LDIR_Ord 0 |
| #define | LDIR_Attr 11 |
| #define | LDIR_Type 12 |
| #define | LDIR_Chksum 13 |
| #define | LDIR_FstClusLO 26 |
| #define | DEF_NAMEBUF BYTE sfn[12] |
| #define | INIT_BUF(dobj) (dobj).fn = sfn |
| #define | FREE_BUF() |
Functions | |
| NODEBUG void | mem_cpy (void *dst, const void *src, UINT cnt) |
| NODEBUG void | str_cpy (char *Dest, const char *Src) |
| NODEBUG void | mem_set (void *dst, int val, UINT cnt) |
| NODEBUG int | mem_cmp (const void *dst, const void *src, UINT cnt) |
| NODEBUG int | chk_chr (const char *str, int chr) |
| static NODEBUG FRESULT | move_window (FATFS *fs, DWORD sector) |
| static NODEBUG FRESULT | sync (FATFS *fs) |
| NODEBUG2 DWORD | clust2sect (FATFS *fs, DWORD clst) |
| NODEBUG2 DWORD | get_fat (FATFS *fs, DWORD clst) |
| NODEBUG2 FRESULT | put_fat (FATFS *fs, DWORD clst, DWORD val) |
| static NODEBUG FRESULT | remove_chain (FATFS *fs, DWORD clst) |
| static NODEBUG DWORD | create_chain (FATFS *fs, DWORD clst) |
| static NODEBUG FRESULT | dir_sdi (DIR *dj, WORD idx) |
| static NODEBUG FRESULT | dir_next (DIR *dj, int stretch) |
| static NODEBUG FRESULT | dir_find (DIR *dj) |
| static NODEBUG FRESULT | dir_read (DIR *dj) |
| static NODEBUG FRESULT | dir_register (DIR *dj) |
| static NODEBUG FRESULT | dir_remove (DIR *dj) |
| static NODEBUG FRESULT | create_name (DIR *dj, const TCHAR **path) |
| static NODEBUG void | get_fileinfo (DIR *dj, FILINFO *fno) |
| static NODEBUG FRESULT | follow_path (DIR *dj, const TCHAR *path) |
| static NODEBUG BYTE | check_fs (FATFS *fs, DWORD sect) |
| NODEBUG2 FRESULT | chk_mounted (const TCHAR **path, FATFS **rfs, BYTE chk_wp) |
| static NODEBUG FRESULT | validate (FATFS *fs, WORD id) |
| NODEBUG FRESULT | f_mount (BYTE vol, FATFS *fs) |
| NODEBUG FRESULT | f_open (FIL *fp, const TCHAR *path, BYTE mode) |
| NODEBUG FRESULT | f_read (FIL *fp, void *buff, UINT btr, UINT *br) |
| NODEBUG FRESULT | f_write (FIL *fp, const void *buff, UINT btw, UINT *bw) |
| NODEBUG FRESULT | f_sync (FIL *fp) |
| NODEBUG FRESULT | f_close (FIL *fp) |
| NODEBUG FRESULT | f_lseek (FIL *fp, DWORD ofs) |
| NODEBUG FRESULT | f_opendir (DIR *dj, const TCHAR *path) |
| NODEBUG FRESULT | f_readdir (DIR *dj, FILINFO *fno) |
| NODEBUG FRESULT | f_stat (const TCHAR *path, FILINFO *fno) |
| NODEBUG FRESULT | f_getfree (const TCHAR *path, DWORD *nclst, FATFS **fatfs) |
| NODEBUG FRESULT | f_truncate (FIL *fp) |
| NODEBUG FRESULT | f_unlink (const TCHAR *path) |
| NODEBUG FRESULT | f_mkdir (const TCHAR *path) |
| NODEBUG FRESULT | f_chmod (const TCHAR *path, BYTE value, BYTE mask) |
| NODEBUG FRESULT | f_utime (const TCHAR *path, const FILINFO *fno) |
| NODEBUG FRESULT | f_rename (const TCHAR *path_old, const TCHAR *path_new) |
Variables | |
| static WORD | Fsid |
| #define ABORT | ( | fs, | |
| res | |||
| ) | { fp->flag |= FA__ERROR; LEAVE_FF(fs, res); } |
| #define LD_CLUST | ( | dir) | (((DWORD)LD_WORD(dir+DIR_FstClusHI)<<16) | LD_WORD(dir+DIR_FstClusLO)) |
| #define MIN_FAT16 4086 /* Minimum number of clusters for FAT16 */ |
| #define MIN_FAT32 65526 /* Minimum number of clusters for FAT32 */ |
| #define ST_CLUST | ( | dir, | |
| cl | |||
| ) | {ST_WORD(dir+DIR_FstClusLO, cl); ST_WORD(dir+DIR_FstClusHI, (DWORD)cl>>16);} |
|
static |
| NODEBUG2 FRESULT chk_mounted | ( | const TCHAR ** | path, |
| FATFS ** | rfs, | ||
| BYTE | chk_wp | ||
| ) |
|
static |
|
static |
|
static |
| NODEBUG FRESULT f_chmod | ( | const TCHAR * | path, |
| BYTE | value, | ||
| BYTE | mask | ||
| ) |
| NODEBUG FRESULT f_getfree | ( | const TCHAR * | path, |
| DWORD * | nclst, | ||
| FATFS ** | fatfs | ||
| ) |
| NODEBUG FRESULT f_open | ( | FIL * | fp, |
| const TCHAR * | path, | ||
| BYTE | mode | ||
| ) |
| NODEBUG FRESULT f_read | ( | FIL * | fp, |
| void * | buff, | ||
| UINT | btr, | ||
| UINT * | br | ||
| ) |
| NODEBUG FRESULT f_rename | ( | const TCHAR * | path_old, |
| const TCHAR * | path_new | ||
| ) |
| NODEBUG FRESULT f_utime | ( | const TCHAR * | path, |
| const FILINFO * | fno | ||
| ) |
| NODEBUG FRESULT f_write | ( | FIL * | fp, |
| const void * | buff, | ||
| UINT | btw, | ||
| UINT * | bw | ||
| ) |
|
static |
|
static |
| NODEBUG int mem_cmp | ( | const void * | dst, |
| const void * | src, | ||
| UINT | cnt | ||
| ) |
| NODEBUG void mem_cpy | ( | void * | dst, |
| const void * | src, | ||
| UINT | cnt | ||
| ) |
|
static |
|
static |
|
static |