capi/ff.h File Reference

#include "type.h"
#include "ffconf.h"
Include dependency graph for ff.h:
This graph shows which files directly or indirectly include this file:

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 Documentation

#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_FileSize   28

Referenced by f_open(), and f_sync().

#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__DIRTY   0x40

Referenced by f_lseek(), f_read(), f_sync(), and f_write().

#define FA__ERROR   0x80

Referenced by f_lseek(), f_read(), and f_write().

#define FA__WRITTEN   0x20

Referenced by f_lseek(), f_open(), f_sync(), and f_write().

#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
#define FA_WRITE   0x02
#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 (  )     0
#define IsDBCS2 (  )     0
#define IsLower (  )     (((c)>='a')&&((c)<='z'))
#define IsUpper (  )     (((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().

#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

Referenced by chk_mounted().

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

Referenced by f_open(), f_sync(), and put_fat().

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

Referenced by f_open(), f_sync(), and put_fat().


Typedef Documentation

typedef struct _DIR_ DIR
typedef void(* f_readcallback)(BYTE drv,BYTE *buff,DWORD sector,BYTE count)
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  ) 

References f_sync(), FR_OK, _FIL_::fs, _FIL_::id, LEAVE_FF, and NULL.

Referenced by LoadFileToSSDMem(), main(), PlayMJPEG(), and Write_JPEG_data_to_SD().

Here is the call graph for this function:

Here is the caller graph for this function:

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  
)

References _DRIVES, FR_INT_ERR, FR_INVALID_DRIVE, FR_OK, and _FATFS_::fs_type.

Referenced by main(), and Write_JPEG_data_to_SD().

Here is the caller graph for this function:

FRESULT f_open ( FIL ,
const XCHAR ,
BYTE   
)
FRESULT f_opendir ( DIR ,
const XCHAR  
)

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().

Here is the call graph for this function:

Here is the caller graph for this function:

FRESULT f_read ( FIL ,
void *  ,
UINT  ,
UINT ,
BYTE  bToSSDMem,
f_readcallback  pRCB 
)
FRESULT f_readdir ( DIR ,
FILINFO  
)

References FALSE, FR_NO_FILE, FR_OK, _DIR_::fs, _DIR_::id, INITBUF, LEAVE_FF, NAMEBUF, and _DIR_::sect.

Referenced by EnumDir().

Here is the caller graph for this function:

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   ) 

Referenced by f_open(), and f_sync().

Here is the caller graph for this function:

Generated on Wed Mar 23 11:08:32 2011 for Omnima LCD by  doxygen 1.6.3