modules/fatfs/src/ff.h File Reference

#include "integer.h"
#include "ffconf.h"

Data Structures

struct  _FATFS_
struct  _DIR_
struct  _FIL_
struct  _FILINFO_

Defines

#define _FATFS   0x007E
#define _DF1S   0
#define _EXCVT
#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 SS(fs)   512U
#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 _FATFS_ FATFS
typedef _DIR_ DIR
typedef _FIL_ FIL
typedef _FILINFO_ FILINFO

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 *)
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 Documentation

#define _DF1S   0

#define _EXCVT

Value:

{0x80,0x9A,0x90,0x41,0x8E,0x41,0x8F,0x80,0x45,0x45,0x45,0x49,0x49,0x49,0x8E,0x8F,0x90,0x92,0x92,0x4F,0x99,0x4F,0x55,0x55,0x59,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
                                0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0x21,0xAE,0xAF,0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
                                0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
                                0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}

#define _FATFS   0x007E

#define AM_ARC   0x20

#define AM_DIR   0x10

#define AM_HID   0x02

#define AM_LFN   0x0F

#define AM_MASK   0x3F

#define AM_RDO   0x01

#define AM_SYS   0x04

#define AM_VOL   0x08

#define BPB_BkBootSec   50

#define BPB_BytsPerSec   11

#define BPB_ExtFlags   40

#define BPB_FATSz16   22

#define BPB_FATSz32   36

#define BPB_FSInfo   48

#define BPB_FSVer   42

#define BPB_HiddSec   28

#define BPB_Media   21

#define BPB_NumFATs   16

#define BPB_NumHeads   26

#define BPB_RootClus   44

#define BPB_RootEntCnt   17

#define BPB_RsvdSecCnt   14

#define BPB_SecPerClus   13

#define BPB_SecPerTrk   24

#define BPB_TotSec16   19

#define BPB_TotSec32   32

#define BS_55AA   510

#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

#define DIR_CrtDate   16

#define DIR_CrtTime   14

#define DIR_FileSize   28

#define DIR_FstClusHI   20

#define DIR_FstClusLO   26

#define DIR_Name   0

#define DIR_NTres   12

#define DIR_WrtDate   24

#define DIR_WrtTime   22

#define FA__DIRTY   0x40

#define FA__ERROR   0x80

#define FA__WRITTEN   0x20

#define FA_CREATE_ALWAYS   0x08

#define FA_CREATE_NEW   0x04

#define FA_OPEN_ALWAYS   0x10

#define FA_OPEN_EXISTING   0x00

#define FA_READ   0x01

#define FA_WRITE   0x02

#define FS_FAT12   1

#define FS_FAT16   2

#define FS_FAT32   3

#define FSI_Free_Count   488

#define FSI_LeadSig   0

#define FSI_Nxt_Free   492

#define FSI_StrucSig   484

#define IsDBCS1 (  )     0

#define IsDBCS2 (  )     0

#define IsLower (  )     (((c)>='a')&&((c)<='z'))

#define IsUpper (  )     (((c)>='A')&&((c)<='Z'))

#define LD2PD ( drv   )     (drv)

#define LD2PT ( drv   )     0

#define LD_DWORD ( ptr   )     (DWORD)(((DWORD)*(BYTE*)((ptr)+3)<<24)|((DWORD)*(BYTE*)((ptr)+2)<<16)|((WORD)*(BYTE*)((ptr)+1)<<8)|*(BYTE*)(ptr))

#define LD_WORD ( ptr   )     (WORD)(((WORD)*(BYTE*)((ptr)+1)<<8)|(WORD)*(BYTE*)(ptr))

#define LDIR_Attr   11

#define LDIR_Chksum   13

#define LDIR_FstClusLO   26

#define LDIR_Ord   0

#define LDIR_Type   12

#define MBR_Table   446

#define SS ( fs   )     512U

#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)

#define ST_WORD ( ptr,
val   )     *(BYTE*)(ptr)=(BYTE)(val); *(BYTE*)((ptr)+1)=(BYTE)((WORD)(val)>>8)


Typedef Documentation

typedef struct _DIR_ DIR

typedef struct _FATFS_ FATFS

typedef struct _FIL_ FIL

typedef struct _FILINFO_ FILINFO

typedef char XCHAR


Enumeration Type Documentation

enum FRESULT

Enumerator:
FR_OK 
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 


Function Documentation

FRESULT f_chdir ( const XCHAR  ) 

FRESULT f_chdrive ( BYTE   ) 

FRESULT f_chmod ( const XCHAR ,
BYTE  ,
BYTE   
)

FRESULT f_close ( FIL  ) 

FRESULT f_forward ( FIL ,
UINT(*)(const BYTE *, UINT ,
UINT  ,
UINT  
)

FRESULT f_getfree ( const XCHAR ,
DWORD ,
FATFS **   
)

FRESULT f_lseek ( FIL ,
DWORD   
)

FRESULT f_mkdir ( const XCHAR  ) 

FRESULT f_mkfs ( BYTE  ,
BYTE  ,
WORD   
)

FRESULT f_mount ( BYTE  ,
FATFS  
)

FRESULT f_open ( FIL ,
const XCHAR ,
BYTE   
)

FRESULT f_opendir ( DIR ,
const XCHAR  
)

FRESULT f_read ( FIL ,
void *  ,
UINT  ,
UINT  
)

FRESULT f_readdir ( DIR ,
FILINFO  
)

FRESULT f_rename ( const XCHAR ,
const XCHAR  
)

FRESULT f_stat ( const XCHAR ,
FILINFO  
)

FRESULT f_sync ( FIL  ) 

FRESULT f_truncate ( FIL  ) 

FRESULT f_unlink ( const XCHAR  ) 

FRESULT f_utime ( const XCHAR ,
const FILINFO  
)

FRESULT f_write ( FIL ,
const void *  ,
UINT  ,
UINT  
)

DWORD get_fattime ( void   ) 


Generated on Tue May 1 19:42:14 2012 for MIOS32 by  doxygen 1.4.7