MAVRK Embedded Software 0.91
Software Libraries for the MAVRK motherboard and related components
Data Structures | Defines | Typedefs | Enumerations | Functions

ff.h File Reference

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

Go to the source code of this file.

Data Structures

struct  FATFS
struct  FIL
struct  DIRS
struct  FILINFO

Defines

#define _FATFS   8237
#define LD2PD(vol)   (vol)
#define LD2PT(vol)   0
#define _T(x)   x
#define _TEXT(x)   x
#define EOF   (-1)
#define f_eof(fp)   (((fp)->fptr == (fp)->fsize) ? 1 : 0)
#define f_error(fp)   (((fp)->flag & FA__ERROR) ? 1 : 0)
#define f_tell(fp)   ((fp)->fptr)
#define f_size(fp)   ((fp)->fsize)
#define FA_READ   0x01
#define FA_OPEN_EXISTING   0x00
#define FA__ERROR   0x80
#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 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 CREATE_LINKMAP   0xFFFFFFFF
#define LD_WORD(ptr)   (WORD)(((WORD)*((unsigned char*)(ptr)+1)<<8)|(WORD)*(unsigned char*)(ptr))
#define LD_DWORD(ptr)   (DWORD)(((DWORD)*((unsigned char*)(ptr)+3)<<24)|((DWORD)*((unsigned char*)(ptr)+2)<<16)|((WORD)*((unsigned char*)(ptr)+1)<<8)|*(unsigned char*)(ptr))
#define ST_WORD(ptr, val)   *(unsigned char*)(ptr)=(unsigned char)(val); *((unsigned char*)(ptr)+1)=(unsigned char)((WORD)(val)>>8)
#define ST_DWORD(ptr, val)   *(unsigned char*)(ptr)=(unsigned char)(val); *((unsigned char*)(ptr)+1)=(unsigned char)((WORD)(val)>>8); *((unsigned char*)(ptr)+2)=(unsigned char)((DWORD)(val)>>16); *((unsigned char*)(ptr)+3)=(unsigned char)((DWORD)(val)>>24)

Typedefs

typedef char TCHAR

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,
  FR_LOCKED, FR_NOT_ENOUGH_CORE, FR_TOO_MANY_OPEN_FILES
}

Functions

FRESULT f_mount (unsigned char, FATFS *)
FRESULT f_open (FIL *, const TCHAR *, unsigned char)
FRESULT f_read (FIL *, void *, UINT, UINT *)
FRESULT f_lseek (FIL *, DWORD)
FRESULT f_close (FIL *)
FRESULT f_opendir (DIRS *, const TCHAR *)
FRESULT f_readdir (DIRS *, FILINFO *)
FRESULT f_stat (const TCHAR *, FILINFO *)
FRESULT f_write (FIL *, const void *, UINT, UINT *)
FRESULT f_getfree (const TCHAR *, DWORD *, FATFS **)
FRESULT f_truncate (FIL *)
FRESULT f_sync (FIL *)
FRESULT f_unlink (const TCHAR *)
FRESULT f_mkdir (const TCHAR *)
FRESULT f_chmod (const TCHAR *, unsigned char, unsigned char)
FRESULT f_utime (const TCHAR *, const FILINFO *)
FRESULT f_rename (const TCHAR *, const TCHAR *)
FRESULT f_forward (FIL *, UINT(*)(const unsigned char *, UINT), UINT, UINT *)
FRESULT f_mkfs (unsigned char, unsigned char, UINT)
FRESULT f_chdrive (unsigned char)
FRESULT f_chdir (const TCHAR *)
FRESULT f_getcwd (TCHAR *, UINT)
int f_putc (TCHAR, FIL *)
int f_puts (const TCHAR *, FIL *)
int f_printf (FIL *, const TCHAR *,...)
TCHARf_gets (TCHAR *, int, FIL *)
DWORD get_fattime (void)

Define Documentation

#define _FATFS   8237
#define _T (   x)    x
#define _TEXT (   x)    x
#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 CREATE_LINKMAP   0xFFFFFFFF
#define EOF   (-1)
#define f_eof (   fp)    (((fp)->fptr == (fp)->fsize) ? 1 : 0)
#define f_error (   fp)    (((fp)->flag & FA__ERROR) ? 1 : 0)
#define f_size (   fp)    ((fp)->fsize)
#define f_tell (   fp)    ((fp)->fptr)
#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 LD2PD (   vol)    (vol)
#define LD2PT (   vol)    0
#define LD_DWORD (   ptr)    (DWORD)(((DWORD)*((unsigned char*)(ptr)+3)<<24)|((DWORD)*((unsigned char*)(ptr)+2)<<16)|((WORD)*((unsigned char*)(ptr)+1)<<8)|*(unsigned char*)(ptr))
#define LD_WORD (   ptr)    (WORD)(((WORD)*((unsigned char*)(ptr)+1)<<8)|(WORD)*(unsigned char*)(ptr))
#define ST_DWORD (   ptr,
  val 
)    *(unsigned char*)(ptr)=(unsigned char)(val); *((unsigned char*)(ptr)+1)=(unsigned char)((WORD)(val)>>8); *((unsigned char*)(ptr)+2)=(unsigned char)((DWORD)(val)>>16); *((unsigned char*)(ptr)+3)=(unsigned char)((DWORD)(val)>>24)
#define ST_WORD (   ptr,
  val 
)    *(unsigned char*)(ptr)=(unsigned char)(val); *((unsigned char*)(ptr)+1)=(unsigned char)((WORD)(val)>>8)

Typedef Documentation

typedef char TCHAR

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 
FR_LOCKED 
FR_NOT_ENOUGH_CORE 
FR_TOO_MANY_OPEN_FILES 

Function Documentation

FRESULT f_chdir ( const TCHAR )
FRESULT f_chdrive ( unsigned  char)
FRESULT f_chmod ( const TCHAR ,
unsigned  char,
unsigned  char 
)
FRESULT f_close ( FIL )
FRESULT f_forward ( FIL ,
UINT(*)(const unsigned char *, UINT ,
UINT  ,
UINT  
)
FRESULT f_getcwd ( TCHAR ,
UINT   
)
FRESULT f_getfree ( const TCHAR ,
DWORD ,
FATFS **   
)
TCHAR* f_gets ( TCHAR ,
int  ,
FIL  
)
FRESULT f_lseek ( FIL ,
DWORD   
)
FRESULT f_mkdir ( const TCHAR )
FRESULT f_mkfs ( unsigned  char,
unsigned  char,
UINT   
)
FRESULT f_mount ( unsigned  char,
FATFS  
)
FRESULT f_open ( FIL ,
const TCHAR ,
unsigned  char 
)
FRESULT f_opendir ( DIRS ,
const TCHAR  
)
int f_printf ( FIL ,
const TCHAR ,
  ... 
)
int f_putc ( TCHAR  ,
FIL  
)
int f_puts ( const TCHAR ,
FIL  
)
FRESULT f_read ( FIL ,
void *  ,
UINT  ,
UINT  
)
FRESULT f_readdir ( DIRS ,
FILINFO  
)
FRESULT f_rename ( const TCHAR ,
const TCHAR  
)
FRESULT f_stat ( const TCHAR ,
FILINFO  
)
FRESULT f_sync ( FIL )
FRESULT f_truncate ( FIL )
FRESULT f_unlink ( const TCHAR )
FRESULT f_utime ( const TCHAR ,
const FILINFO  
)
FRESULT f_write ( FIL ,
const void *  ,
UINT  ,
UINT  
)
DWORD get_fattime ( void  )
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines