#include "type.h"#include "ffconf.h"

Go to the source code of this file.
Data Structures | |
| struct | _FATFS_ |
| struct | _DIR_ |
| struct | _FIL_ |
| struct | _FILINFO_ |
| struct | cacheReadData |
Defines | |
| #define | IsUpper(c) (((c)>='A')&&((c)<='Z')) |
| #define | IsLower(c) (((c)>='a')&&((c)<='z')) |
| #define | IsDBCS1(c) 0 |
| #define | IsDBCS2(c) 0 |
| #define | LD2PD(drv) (drv) |
| #define | LD2PT(drv) 0 |
| #define | FA_READ 0x01 |
| #define | FA_OPEN_EXISTING 0x00 |
| #define | FA_WRITE 0x02 |
| #define | FA_CREATE_NEW 0x04 |
| #define | FA_CREATE_ALWAYS 0x08 |
| #define | FA_OPEN_ALWAYS 0x10 |
| #define | FA__WRITTEN 0x20 |
| #define | FA__DIRTY 0x40 |
| #define | FA__ERROR 0x80 |
| #define | FS_FAT12 1 |
| #define | FS_FAT16 2 |
| #define | FS_FAT32 3 |
| #define | AM_RDO 0x01 |
| #define | AM_HID 0x02 |
| #define | AM_SYS 0x04 |
| #define | AM_VOL 0x08 |
| #define | AM_LFN 0x0F |
| #define | AM_DIR 0x10 |
| #define | AM_ARC 0x20 |
| #define | AM_MASK 0x3F |
| #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_55AA 510 |
| #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 | 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 | LD_WORD(ptr) (WORD)(((WORD)*(BYTE*)((ptr)+1)<<8)|(WORD)*(BYTE*)(ptr)) |
| #define | LD_DWORD(ptr) (DWORD)(((DWORD)*(BYTE*)((ptr)+3)<<24)|((DWORD)*(BYTE*)((ptr)+2)<<16)|((WORD)*(BYTE*)((ptr)+1)<<8)|*(BYTE*)(ptr)) |
| #define | ST_WORD(ptr, val) *(BYTE*)(ptr)=(BYTE)(val); *(BYTE*)((ptr)+1)=(BYTE)((WORD)(val)>>8) |
| #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) |
Typedefs | |
| typedef char | XCHAR |
| typedef struct _FATFS_ | FATFS |
| typedef struct _DIR_ | DIR |
| typedef struct _FIL_ | FIL |
| typedef struct _FILINFO_ | FILINFO |
| typedef void(* | f_readcallback )(BYTE drv, BYTE *buff, DWORD sector, BYTE count) |
Enumerations | |
| enum | FRESULT { FR_OK = 0, FR_DISK_ERR, FR_INT_ERR, FR_NOT_READY, FR_NO_FILE, FR_NO_PATH, FR_INVALID_NAME, FR_DENIED, FR_EXIST, FR_INVALID_OBJECT, FR_WRITE_PROTECTED, FR_INVALID_DRIVE, FR_NOT_ENABLED, FR_NO_FILESYSTEM, FR_MKFS_ABORTED, FR_TIMEOUT } |
Functions | |
| FRESULT | f_mount (BYTE, FATFS *) |
| FRESULT | f_open (FIL *, const XCHAR *, BYTE) |
| FRESULT | f_read (FIL *, void *, UINT, UINT *, BYTE bToSSDMem, f_readcallback pRCB) |
| FRESULT | f_write (FIL *, const void *, UINT, UINT *) |
| FRESULT | f_lseek (FIL *, DWORD) |
| FRESULT | f_close (FIL *) |
| FRESULT | f_opendir (DIR *, const XCHAR *) |
| FRESULT | f_readdir (DIR *, FILINFO *) |
| FRESULT | f_stat (const XCHAR *, FILINFO *) |
| FRESULT | f_getfree (const XCHAR *, DWORD *, FATFS **) |
| FRESULT | f_truncate (FIL *) |
| FRESULT | f_sync (FIL *) |
| FRESULT | f_unlink (const XCHAR *) |
| FRESULT | f_mkdir (const XCHAR *) |
| FRESULT | f_chmod (const XCHAR *, BYTE, BYTE) |
| FRESULT | f_utime (const XCHAR *, const FILINFO *) |
| FRESULT | f_rename (const XCHAR *, const XCHAR *) |
| FRESULT | f_forward (FIL *, UINT(*)(const BYTE *, UINT), UINT, UINT *) |
| FRESULT | f_mkfs (BYTE, BYTE, WORD) |
| FRESULT | f_chdir (const XCHAR *) |
| FRESULT | f_chdrive (BYTE) |
| DWORD | get_fattime (void) |
| #define AM_ARC 0x20 |
Referenced by f_sync().
| #define AM_DIR 0x10 |
Referenced by EnumDir(), f_open(), and f_opendir().
| #define AM_HID 0x02 |
Referenced by EnumDir().
| #define AM_LFN 0x0F |
Referenced by EnumDir().
| #define AM_MASK 0x3F |
| #define AM_RDO 0x01 |
Referenced by f_open().
| #define AM_SYS 0x04 |
Referenced by EnumDir().
| #define AM_VOL 0x08 |
Referenced by EnumDir().
| #define BPB_BkBootSec 50 |
| #define BPB_BytsPerSec 11 |
Referenced by chk_mounted().
| #define BPB_ExtFlags 40 |
| #define BPB_FATSz16 22 |
Referenced by chk_mounted().
| #define BPB_FATSz32 36 |
Referenced by chk_mounted().
| #define BPB_FSInfo 48 |
Referenced by chk_mounted().
| #define BPB_FSVer 42 |
| #define BPB_HiddSec 28 |
| #define BPB_Media 21 |
| #define BPB_NumFATs 16 |
Referenced by chk_mounted().
| #define BPB_NumHeads 26 |
| #define BPB_RootClus 44 |
Referenced by chk_mounted().
| #define BPB_RootEntCnt 17 |
Referenced by chk_mounted().
| #define BPB_RsvdSecCnt 14 |
Referenced by chk_mounted().
| #define BPB_SecPerClus 13 |
Referenced by chk_mounted().
| #define BPB_SecPerTrk 24 |
| #define BPB_TotSec16 19 |
Referenced by chk_mounted().
| #define BPB_TotSec32 32 |
Referenced by chk_mounted().
| #define BS_55AA 510 |
Referenced by chk_mounted().
| #define BS_BootSig 38 |
| #define BS_BootSig32 66 |
| #define BS_DrvNum 36 |
| #define BS_DrvNum32 64 |
| #define BS_FilSysType 54 |
| #define BS_FilSysType32 82 |
| #define BS_jmpBoot 0 |
| #define BS_OEMName 3 |
| #define BS_VolID 39 |
| #define BS_VolID32 67 |
| #define BS_VolLab 43 |
| #define BS_VolLab32 71 |
| #define DIR_Attr 11 |
Referenced by f_open(), f_opendir(), and f_sync().
| #define DIR_CrtDate 16 |
| #define DIR_CrtTime 14 |
Referenced by f_open().
| #define DIR_FstClusHI 20 |
Referenced by f_open(), f_opendir(), and f_sync().
| #define DIR_FstClusLO 26 |
Referenced by f_open(), f_opendir(), and f_sync().
| #define DIR_Name 0 |
| #define DIR_NTres 12 |
| #define DIR_WrtDate 24 |
| #define DIR_WrtTime 22 |
Referenced by f_sync().
| #define FA_CREATE_ALWAYS 0x08 |
Referenced by f_open(), and Write_JPEG_data_to_SD().
| #define FA_CREATE_NEW 0x04 |
Referenced by f_open().
| #define FA_OPEN_ALWAYS 0x10 |
Referenced by f_open().
| #define FA_OPEN_EXISTING 0x00 |
Referenced by LoadFileToSSDMem(), and PlayMJPEG().
| #define FA_READ 0x01 |
Referenced by f_open(), f_read(), LoadFileToSSDMem(), and PlayMJPEG().
| #define FA_WRITE 0x02 |
Referenced by f_lseek(), f_open(), f_write(), and Write_JPEG_data_to_SD().
| #define FS_FAT12 1 |
Referenced by chk_mounted(), get_fat(), and put_fat().
| #define FS_FAT16 2 |
Referenced by chk_mounted(), get_fat(), and put_fat().
| #define FS_FAT32 3 |
Referenced by chk_mounted(), get_fat(), and put_fat().
| #define FSI_Free_Count 488 |
Referenced by chk_mounted().
| #define FSI_LeadSig 0 |
Referenced by chk_mounted().
| #define FSI_Nxt_Free 492 |
Referenced by chk_mounted().
| #define FSI_StrucSig 484 |
Referenced by chk_mounted().
| #define IsDBCS1 | ( | c | ) | 0 |
| #define IsDBCS2 | ( | c | ) | 0 |
| #define IsLower | ( | c | ) | (((c)>='a')&&((c)<='z')) |
| #define IsUpper | ( | c | ) | (((c)>='A')&&((c)<='Z')) |
| #define LD2PD | ( | drv | ) | (drv) |
Referenced by chk_mounted().
| #define LD2PT | ( | drv | ) | 0 |
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)) |
Referenced by chk_mounted(), f_open(), and get_fat().
Referenced by chk_mounted(), f_open(), f_opendir(), and get_fat().
| #define LDIR_Attr 11 |
| #define LDIR_Chksum 13 |
| #define LDIR_FstClusLO 26 |
| #define LDIR_Ord 0 |
| #define LDIR_Type 12 |
| #define MBR_Table 446 |
Referenced by chk_mounted().
| typedef void(* f_readcallback)(BYTE drv,BYTE *buff,DWORD sector,BYTE count) |
| typedef char XCHAR |
| enum FRESULT |
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().


1.6.3