#include "integer.h"
Go to the source code of this file.
Data Structures | |
struct | _FATFS |
struct | _DIR |
struct | _FIL |
struct | _FILINFO |
Defines | |
#define | _MCU_ENDIAN 1 |
#define | _FS_READONLY 0 |
#define | _FS_MINIMIZE 0 |
#define | _USE_STRFUNC 0 |
#define | _USE_MKFS 0 |
#define | _DRIVES 2 |
#define | _MULTI_PARTITION 0 |
#define | _USE_FSINFO 0 |
#define | _USE_SJIS 1 |
#define | _USE_NTFLAG 1 |
#define | S_MAX_SIZ 512U |
#define | SS(fs) 512U |
#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 | 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 | LD_WORD(ptr) (WORD)(*(WORD*)(BYTE*)(ptr)) |
#define | LD_DWORD(ptr) (DWORD)(*(DWORD*)(BYTE*)(ptr)) |
#define | ST_WORD(ptr, val) *(WORD*)(BYTE*)(ptr)=(WORD)(val) |
#define | ST_DWORD(ptr, val) *(DWORD*)(BYTE*)(ptr)=(DWORD)(val) |
#define | _FATFS |
Typedefs | |
typedef struct _FATFS | FATFS |
typedef struct _DIR | DIR |
typedef struct _FIL | FIL |
typedef struct _FILINFO | FILINFO |
Enumerations | |
enum | FRESULT { FR_OK = 0, FR_NOT_READY, FR_NO_FILE, FR_NO_PATH, FR_INVALID_NAME, FR_INVALID_DRIVE, FR_DENIED, FR_EXIST, FR_RW_ERROR, FR_WRITE_PROTECTED, FR_NOT_ENABLED, FR_NO_FILESYSTEM, FR_INVALID_OBJECT, FR_MKFS_ABORTED } |
Functions | |
FRESULT | f_mount (BYTE, FATFS *) |
FRESULT | f_open (FIL *, const char *, BYTE) |
FRESULT | f_read (FIL *, void *, UINT, UINT *) |
FRESULT | f_write (FIL *, const void *, UINT, UINT *) |
FRESULT | f_lseek (FIL *, DWORD) |
FRESULT | f_close (FIL *) |
FRESULT | f_opendir (DIR *, const char *) |
FRESULT | f_readdir (DIR *, FILINFO *) |
FRESULT | f_stat (const char *, FILINFO *) |
FRESULT | f_getfree (const char *, DWORD *, FATFS **) |
FRESULT | f_truncate (FIL *) |
FRESULT | f_sync (FIL *) |
FRESULT | f_unlink (const char *) |
FRESULT | f_mkdir (const char *) |
FRESULT | f_chmod (const char *, BYTE, BYTE) |
FRESULT | f_utime (const char *, const FILINFO *) |
FRESULT | f_rename (const char *, const char *) |
FRESULT | f_mkfs (BYTE, BYTE, WORD) |
DWORD | get_fattime (void) |
#define _DRIVES 2 |
#define _USE_NTFLAG 1 |
#define _USE_SJIS 1 |
#define AM_DIR 0x10 |
Definition at line 260 of file ff.h.
Referenced by f_mkdir(), f_open(), f_opendir(), f_unlink(), and trace_path().
#define AM_RDO 0x01 |
#define AM_VOL 0x08 |
#define BPB_BytsPerSec 11 |
#define BPB_ExtFlags 40 |
#define BPB_FATSz16 22 |
#define BPB_FATSz32 36 |
#define BPB_FSInfo 48 |
#define BPB_NumFATs 16 |
#define BPB_RootClus 44 |
#define BPB_RootEntCnt 17 |
#define BPB_RsvdSecCnt 14 |
#define BPB_SecPerClus 13 |
#define BPB_TotSec16 19 |
#define BPB_TotSec32 32 |
#define BS_55AA 510 |
#define BS_FilSysType 54 |
#define BS_FilSysType32 82 |
#define DIR_Attr 11 |
Definition at line 309 of file ff.h.
Referenced by f_chmod(), f_mkdir(), f_open(), f_opendir(), f_readdir(), f_rename(), f_sync(), f_unlink(), get_fileinfo(), and trace_path().
#define DIR_FileSize 28 |
#define DIR_FstClusHI 20 |
Definition at line 313 of file ff.h.
Referenced by f_mkdir(), f_open(), f_opendir(), f_sync(), f_unlink(), and trace_path().
#define DIR_FstClusLO 26 |
Definition at line 316 of file ff.h.
Referenced by f_mkdir(), f_open(), f_opendir(), f_sync(), f_unlink(), and trace_path().
#define DIR_Name 0 |
Definition at line 308 of file ff.h.
Referenced by f_mkdir(), f_open(), f_readdir(), f_rename(), f_unlink(), reserve_direntry(), and trace_path().
#define DIR_NTres 12 |
Definition at line 310 of file ff.h.
Referenced by f_mkdir(), f_open(), f_rename(), and get_fileinfo().
#define DIR_WrtDate 24 |
#define DIR_WrtTime 22 |
#define FA__DIRTY 0x40 |
#define FA__ERROR 0x80 |
#define FA__WRITTEN 0x20 |
#define FA_CREATE_NEW 0x04 |
#define FA_READ 0x01 |
#define FA_WRITE 0x02 |
#define FS_FAT12 1 |
Definition at line 248 of file ff.h.
Referenced by auto_mount(), f_getfree(), get_cluster(), and put_cluster().
#define FS_FAT16 2 |
Definition at line 249 of file ff.h.
Referenced by auto_mount(), f_getfree(), get_cluster(), and put_cluster().
#define FS_FAT32 3 |
Definition at line 250 of file ff.h.
Referenced by auto_mount(), f_getfree(), f_mkdir(), get_cluster(), put_cluster(), sync(), and trace_path().
#define FSI_Free_Count 488 |
#define FSI_LeadSig 0 |
#define FSI_Nxt_Free 492 |
#define FSI_StrucSig 484 |
#define LD2PD | ( | drv | ) | (drv) |
#define LD2PT | ( | drv | ) | 0 |
Definition at line 325 of file ff.h.
Referenced by auto_mount(), f_getfree(), f_open(), get_cluster(), and get_fileinfo().
Definition at line 324 of file ff.h.
Referenced by auto_mount(), check_fs(), f_getfree(), f_open(), f_opendir(), f_unlink(), get_cluster(), get_fileinfo(), and trace_path().
#define MBR_Table 446 |
#define S_MAX_SIZ 512U |
#define SS | ( | fs | ) | 512U |
Definition at line 75 of file ff.h.
Referenced by auto_mount(), f_lseek(), f_mkdir(), f_read(), f_readdir(), f_unlink(), f_write(), get_cluster(), next_dir_entry(), put_cluster(), reserve_direntry(), and trace_path().
enum FRESULT |
Definition at line 1556 of file ff.c.
References AM_ARC, AM_HID, AM_RDO, AM_SYS, auto_mount(), DIR_Attr, FR_INVALID_NAME, FR_OK, _DIR::fs, sync(), and trace_path().
Definition at line 1380 of file ff.c.
References auto_mount(), FR_OK, FR_RW_ERROR, FS_FAT12, FS_FAT16, FS_FAT32, get_cluster(), LD_DWORD, LD_WORD, and move_window().
Definition at line 1135 of file ff.c.
References _FS_READONLY, _FIL::buffer, clust2sect(), create_chain(), _FIL::csect, _FATFS::csize, _FIL::curr_clust, _FIL::curr_sect, disk_read(), disk_write(), _FATFS::drive, FA__DIRTY, FA__ERROR, FA__WRITTEN, FA_WRITE, _FIL::flag, _FIL::fptr, FR_OK, FR_RW_ERROR, _FIL::fs, _FIL::fsize, get_cluster(), _FIL::id, _FATFS::max_clust, _FIL::org_clust, RES_OK, SS, and validate().
FRESULT f_mkdir | ( | const char * | ) |
Definition at line 1491 of file ff.c.
References AM_DIR, auto_mount(), clust2sect(), create_chain(), _FATFS::csize, DIR_Attr, DIR_FstClusHI, DIR_FstClusLO, DIR_Name, DIR_NTres, DIR_WrtTime, _FATFS::dirbase, disk_write(), _FATFS::drive, FR_DENIED, FR_EXIST, FR_NO_FILE, FR_OK, FR_RW_ERROR, _DIR::fs, FS_FAT32, _FATFS::fs_type, get_fattime(), memcpy(), memset(), move_window(), RES_OK, reserve_direntry(), _DIR::sclust, SS, ST_DWORD, ST_WORD, sync(), trace_path(), _FATFS::win, _FATFS::winflag, and _FATFS::winsect.
Definition at line 795 of file ff.c.
References _DRIVES, FR_INVALID_DRIVE, FR_OK, and _FATFS::fs_type.
Referenced by MMCTask().
Definition at line 817 of file ff.c.
References AM_DIR, AM_RDO, auto_mount(), _FIL::csect, _FIL::curr_sect, DIR_Attr, DIR_CrtTime, DIR_FileSize, DIR_FstClusHI, DIR_FstClusLO, DIR_Name, DIR_NTres, _FIL::dir_ptr, _FIL::dir_sect, 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, FR_RW_ERROR, _DIR::fs, _FIL::fs, _FIL::fsize, get_fattime(), _FATFS::id, _FIL::id, _FATFS::last_clust, LD_DWORD, LD_WORD, memcpy(), memset(), move_window(), _FIL::org_clust, remove_chain(), reserve_direntry(), ST_DWORD, ST_WORD, trace_path(), _FATFS::winflag, and _FATFS::winsect.
Definition at line 1233 of file ff.c.
References AM_DIR, auto_mount(), _DIR::clust, clust2sect(), DIR_Attr, DIR_FstClusHI, DIR_FstClusLO, FR_NO_FILE, FR_OK, _DIR::fs, _FATFS::id, _DIR::id, _DIR::index, LD_WORD, _DIR::sect, and trace_path().
Definition at line 909 of file ff.c.
References _FIL::buffer, clust2sect(), _FIL::csect, _FATFS::csize, _FIL::curr_clust, _FIL::curr_sect, disk_read(), disk_write(), _FATFS::drive, FA__DIRTY, FA__ERROR, FA_READ, _FIL::flag, _FIL::fptr, FR_DENIED, FR_OK, FR_RW_ERROR, _FIL::fs, _FIL::fsize, get_cluster(), _FIL::id, _FATFS::max_clust, memcpy(), _FIL::org_clust, RES_OK, SS, and validate().
Referenced by DRead().
Definition at line 1270 of file ff.c.
References AM_VOL, DIR_Attr, DIR_Name, _FILINFO::fname, FR_OK, FR_RW_ERROR, _DIR::fs, get_fileinfo(), _DIR::id, _DIR::index, move_window(), next_dir_entry(), _DIR::sect, SS, validate(), and _FATFS::win.
FRESULT f_rename | ( | const char * | , | |
const char * | ||||
) |
Definition at line 1625 of file ff.c.
References auto_mount(), DIR_Attr, DIR_Name, DIR_NTres, FR_EXIST, FR_NO_FILE, FR_OK, FR_RW_ERROR, _DIR::fs, memcpy(), move_window(), reserve_direntry(), sync(), trace_path(), _FATFS::winflag, and _FATFS::winsect.
Definition at line 1305 of file ff.c.
References auto_mount(), FR_INVALID_NAME, FR_OK, _DIR::fs, get_fileinfo(), and trace_path().
Definition at line 1067 of file ff.c.
References AM_ARC, _FIL::buffer, _FIL::curr_sect, DIR_Attr, DIR_FileSize, DIR_FstClusHI, DIR_FstClusLO, _FIL::dir_ptr, _FIL::dir_sect, DIR_WrtTime, disk_write(), _FATFS::drive, FA__DIRTY, FA__WRITTEN, _FIL::flag, FR_OK, FR_RW_ERROR, _FIL::fs, _FIL::fsize, get_fattime(), _FIL::id, move_window(), _FIL::org_clust, RES_OK, ST_DWORD, ST_WORD, sync(), and validate().
Definition at line 1337 of file ff.c.
References _FIL::curr_clust, FA__ERROR, FA__WRITTEN, FA_WRITE, _FIL::flag, _FIL::fptr, FR_DENIED, FR_OK, FR_RW_ERROR, _FIL::fs, _FIL::fsize, get_cluster(), _FIL::id, _FIL::org_clust, put_cluster(), remove_chain(), and validate().
FRESULT f_unlink | ( | const char * | ) |
Definition at line 1443 of file ff.c.
References AM_DIR, AM_RDO, AM_VOL, auto_mount(), _DIR::clust, clust2sect(), DIR_Attr, DIR_FstClusHI, DIR_FstClusLO, DIR_Name, FR_DENIED, FR_INVALID_NAME, FR_OK, FR_RW_ERROR, _DIR::fs, _DIR::index, LD_WORD, move_window(), next_dir_entry(), remove_chain(), _DIR::sect, SS, sync(), trace_path(), _FATFS::win, _FATFS::winflag, and _FATFS::winsect.
Definition at line 1591 of file ff.c.
References auto_mount(), DIR_WrtDate, DIR_WrtTime, _FILINFO::fdate, FR_INVALID_NAME, FR_OK, _DIR::fs, _FILINFO::ftime, ST_WORD, sync(), and trace_path().
Definition at line 985 of file ff.c.
References _FIL::buffer, clust2sect(), create_chain(), _FIL::csect, _FATFS::csize, _FIL::curr_clust, _FIL::curr_sect, disk_read(), disk_write(), _FATFS::drive, FA__DIRTY, FA__ERROR, FA__WRITTEN, FA_WRITE, _FIL::flag, _FIL::fptr, FR_DENIED, FR_OK, FR_RW_ERROR, _FIL::fs, _FIL::fsize, _FIL::id, _FATFS::max_clust, memcpy(), _FIL::org_clust, RES_OK, SS, and validate().
Referenced by MMCTask().
DWORD get_fattime | ( | void | ) |