#include "ff.h"
#include "type.h"
#include "string.h"
#include "trace.h"
Defines | |
#define | ENTER_FF(fs) |
#define | LEAVE_FF(fs, res) return res |
#define | ABORT(fs, res) { fp->flag |= FA__ERROR; LEAVE_FF(fs, res); } |
#define | NULL 0 |
#define | NS 11 |
#define | NS_LOSS 0x01 |
#define | NS_LFN 0x02 |
#define | NS_LAST 0x04 |
#define | NS_BODY 0x08 |
#define | NS_EXT 0x10 |
#define | NS_DOT 0x20 |
#define | NAMEBUF(sp, lp) BYTE sp[12] |
#define | INITBUF(dj, sp, lp) dj.fn = sp |
Functions | |
DWORD | get_fat (FATFS *fs, DWORD clst) |
FRESULT | put_fat (FATFS *fs, DWORD clst, DWORD val) |
DWORD | clust2sect (FATFS *fs, DWORD clst) |
FRESULT | chk_mounted (const XCHAR **path, FATFS **rfs, BYTE chk_wp) |
FRESULT | f_mount (BYTE vol, FATFS *fs) |
FRESULT | f_open (FIL *fp, const XCHAR *path, BYTE mode) |
FRESULT | f_read (FIL *fp, void *buff, UINT btr, UINT *br, BYTE bToSSDMem, f_readcallback pRCB) |
FRESULT | f_write (FIL *fp, const void *buff, UINT btw, UINT *bw) |
FRESULT | f_sync (FIL *fp) |
FRESULT | f_close (FIL *fp) |
FRESULT | f_lseek (FIL *fp, DWORD ofs) |
FRESULT | f_opendir (DIR *dj, const XCHAR *path) |
FRESULT | f_readdir (DIR *dj, FILINFO *fno) |
#define ABORT | ( | fs, | |||
res | ) | { fp->flag |= FA__ERROR; LEAVE_FF(fs, res); } |
#define ENTER_FF | ( | fs | ) |
Referenced by chk_mounted().
#define INITBUF | ( | dj, | |||
sp, | |||||
lp | ) | dj.fn = sp |
Referenced by f_open(), f_opendir(), and f_readdir().
#define LEAVE_FF | ( | fs, | |||
res | ) | return res |
Referenced by f_close(), f_lseek(), f_open(), f_opendir(), f_read(), f_readdir(), f_sync(), and f_write().
#define NAMEBUF | ( | sp, | |||
lp | ) | BYTE sp[12] |
Referenced by f_open(), f_opendir(), and f_readdir().
#define NS 11 |
#define NS_BODY 0x08 |
#define NS_DOT 0x20 |
#define NS_EXT 0x10 |
#define NS_LAST 0x04 |
#define NS_LFN 0x02 |
#define NS_LOSS 0x01 |
#define NULL 0 |
Referenced by f_close(), f_open(), ParseCmdLine(), and Write_JPEG_data_to_SD().
References _DRIVES, _MAX_SS, BPB_BytsPerSec, BPB_FATSz16, BPB_FATSz32, BPB_FSInfo, BPB_NumFATs, BPB_RootClus, BPB_RootEntCnt, BPB_RsvdSecCnt, BPB_SecPerClus, BPB_TotSec16, BPB_TotSec32, BS_55AA, _FATFS_::csize, _FATFS_::database, _FATFS_::dirbase, disk_initialize(), disk_ioctl(), disk_read(), disk_status(), _FATFS_::drive, DWORD, 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_FAT12, FS_FAT16, FS_FAT32, _FATFS_::fs_type, _FATFS_::fsi_flag, FSI_Free_Count, FSI_LeadSig, FSI_Nxt_Free, _FATFS_::fsi_sector, FSI_StrucSig, GET_SECTOR_SIZE, _FATFS_::id, _FATFS_::last_clust, LD2PD, LD2PT, LD_DWORD, LD_WORD, _FATFS_::max_clust, MBR_Table, _FATFS_::n_fats, _FATFS_::n_rootdir, RES_OK, _FATFS_::sects_fat, STA_NOINIT, STA_PROTECT, TRACE, TRACE1, TRACE3, UINT, _FATFS_::wflag, _FATFS_::win, and _FATFS_::winsect.
Referenced by f_open(), and f_opendir().
References _FATFS_::csize, _FATFS_::database, and _FATFS_::max_clust.
Referenced by f_lseek(), f_read(), and f_write().
References f_sync(), FR_OK, _FIL_::fs, _FIL_::id, LEAVE_FF, and NULL.
Referenced by LoadFileToSSDMem(), main(), PlayMJPEG(), and Write_JPEG_data_to_SD().
References _FS_READONLY, ABORT, _FIL_::buf, clust2sect(), _FIL_::csect, _FATFS_::csize, _FIL_::curr_clust, disk_read(), disk_write(), _FATFS_::drive, _FIL_::dsect, DWORD, FA__DIRTY, FA__ERROR, FA__WRITTEN, FA_WRITE, _FIL_::flag, _FIL_::fptr, FR_DISK_ERR, FR_INT_ERR, FR_OK, _FIL_::fs, _FIL_::fsize, get_fat(), _FIL_::id, LEAVE_FF, _FATFS_::max_clust, _FIL_::org_clust, RES_OK, and TRACE.
Referenced by LoadFileToSSDMem().
References _DRIVES, FR_INT_ERR, FR_INVALID_DRIVE, FR_OK, and _FATFS_::fs_type.
Referenced by main(), and Write_JPEG_data_to_SD().
References AM_DIR, AM_RDO, chk_mounted(), _FIL_::csect, _DIR_::dir, DIR_Attr, DIR_CrtTime, DIR_FileSize, DIR_FstClusHI, DIR_FstClusLO, _FIL_::dir_ptr, _FIL_::dir_sect, _FIL_::dsect, DWORD, FA__WRITTEN, FA_CREATE_ALWAYS, FA_CREATE_NEW, FA_OPEN_ALWAYS, FA_READ, FA_WRITE, _FIL_::flag, _FIL_::fptr, FR_DENIED, FR_EXIST, FR_NO_FILE, FR_OK, _DIR_::fs, _FIL_::fs, _FIL_::fsize, get_fattime(), _FATFS_::id, _FIL_::id, INITBUF, _FATFS_::last_clust, LD_DWORD, LD_WORD, LEAVE_FF, NAMEBUF, NULL, _FIL_::org_clust, ST_DWORD, ST_WORD, TRACE, TRACE1, _FATFS_::wflag, and _FATFS_::winsect.
Referenced by LoadFileToSSDMem(), OpenFile(), PlayMJPEG(), and Write_JPEG_data_to_SD().
References AM_DIR, chk_mounted(), _DIR_::dir, DIR_Attr, DIR_FstClusHI, DIR_FstClusLO, DWORD, FR_NO_FILE, FR_NO_PATH, FR_OK, _DIR_::fs, _FATFS_::id, _DIR_::id, INITBUF, LD_WORD, LEAVE_FF, NAMEBUF, _DIR_::sclust, and TRACE.
Referenced by EnumDir().
References ABORT, _FIL_::buf, clust2sect(), _FIL_::csect, _FATFS_::csize, _FIL_::curr_clust, disk_read(), disk_write(), _FATFS_::drive, _FIL_::dsect, DWORD, 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, _FIL_::org_clust, RES_OK, TRACE, TRACE2, UINT, _FATFS_::wflag, _FATFS_::win, and _FATFS_::winsect.
Referenced by LoadFileToSSDMem(), PlayMJPEG(), and ReadFile().
References FALSE, FR_NO_FILE, FR_OK, _DIR_::fs, _DIR_::id, INITBUF, LEAVE_FF, NAMEBUF, and _DIR_::sect.
Referenced by EnumDir().
References AM_ARC, _FIL_::buf, DIR_Attr, DIR_FileSize, DIR_FstClusHI, DIR_FstClusLO, _FIL_::dir_ptr, _FIL_::dir_sect, DIR_WrtTime, disk_write(), _FATFS_::drive, _FIL_::dsect, DWORD, FA__DIRTY, FA__WRITTEN, _FIL_::flag, FR_DISK_ERR, FR_OK, _FIL_::fs, _FIL_::fsize, get_fattime(), _FIL_::id, LEAVE_FF, _FIL_::org_clust, RES_OK, ST_DWORD, ST_WORD, and _FATFS_::wflag.
Referenced by f_close().
References ABORT, _FIL_::buf, clust2sect(), _FIL_::csect, _FATFS_::csize, _FIL_::curr_clust, disk_read(), disk_write(), _FATFS_::drive, _FIL_::dsect, DWORD, 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, _FIL_::org_clust, RES_OK, TRACE, TRACE1, UINT, _FATFS_::wflag, _FATFS_::win, and _FATFS_::winsect.
Referenced by Write_JPEG_data_to_SD(), and WriteFile().
References DWORD, _FATFS_::fatbase, FS_FAT12, FS_FAT16, FS_FAT32, _FATFS_::fs_type, LD_DWORD, LD_WORD, _FATFS_::max_clust, TRACE1, UINT, _FATFS_::win, and WORD.
Referenced by f_lseek(), and f_read().
References DWORD, _FATFS_::fatbase, FR_INT_ERR, FR_OK, FS_FAT12, FS_FAT16, FS_FAT32, _FATFS_::fs_type, _FATFS_::max_clust, ST_DWORD, ST_WORD, TRACE, TRACE1, UINT, _FATFS_::wflag, _FATFS_::win, and WORD.