E:/Projects/AvrLib/FatFS/ff.c File Reference

#include <string.h>
#include "ff.h"
#include "diskio.h"
#include "fattime.h"

Include dependency graph for ff.c:

Go to the source code of this file.

Functions

static BOOL move_window (FATFS *fs, DWORD sector)
static FRESULT sync (FATFS *fs)
static DWORD get_cluster (FATFS *fs, DWORD clust)
static BOOL put_cluster (FATFS *fs, DWORD clust, DWORD val)
static BOOL remove_chain (FATFS *fs, DWORD clust)
static DWORD create_chain (FATFS *fs, DWORD clust)
static DWORD clust2sect (FATFS *fs, DWORD clust)
static BOOL next_dir_entry (DIR *dj)
static void get_fileinfo (FILINFO *finfo, const BYTE *dir)
static char make_dirfile (const char **path, char *dirname)
static FRESULT trace_path (DIR *dj, char *fn, const char *path, BYTE **dir)
static FRESULT reserve_direntry (DIR *dj, BYTE **dir)
static BYTE check_fs (FATFS *fs, DWORD sect)
static FRESULT auto_mount (const char **path, FATFS **rfs, BYTE chk_wp)
static FRESULT validate (const FATFS *fs, WORD id)
FRESULT f_mount (BYTE drv, FATFS *fs)
FRESULT f_open (FIL *fp, const char *path, BYTE mode)
FRESULT f_read (FIL *fp, void *buff, UINT btr, UINT *br)
FRESULT f_write (FIL *fp, const void *buff, UINT btw, UINT *bw)
FRESULT f_sync (FIL *fp)
FRESULT f_close (FIL *fp)
FRESULT f_lseek (FIL *fp, DWORD ofs)
FRESULT f_opendir (DIR *dj, const char *path)
FRESULT f_readdir (DIR *dj, FILINFO *finfo)
FRESULT f_stat (const char *path, FILINFO *finfo)
FRESULT f_truncate (FIL *fp)
FRESULT f_getfree (const char *drv, DWORD *nclust, FATFS **fatfs)
FRESULT f_unlink (const char *path)
FRESULT f_mkdir (const char *path)
FRESULT f_chmod (const char *path, BYTE value, BYTE mask)
FRESULT f_utime (const char *path, const FILINFO *finfo)
FRESULT f_rename (const char *path_old, const char *path_new)

Variables

static FATFSFatFs [_DRIVES]
static WORD fsid


Function Documentation

static FRESULT auto_mount ( const char **  path,
FATFS **  rfs,
BYTE  chk_wp 
) [static]

static BYTE check_fs ( FATFS fs,
DWORD  sect 
) [static]

Definition at line 618 of file ff.c.

References BPB_ExtFlags, BS_55AA, BS_FilSysType, BS_FilSysType32, disk_read(), _FATFS::drive, LD_WORD, memcmp(), RES_OK, and _FATFS::win.

Referenced by auto_mount().

static DWORD clust2sect ( FATFS fs,
DWORD  clust 
) [static]

static DWORD create_chain ( FATFS fs,
DWORD  clust 
) [static]

FRESULT f_chmod ( const char *  path,
BYTE  value,
BYTE  mask 
)

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

FRESULT f_close ( FIL fp  ) 

Definition at line 1111 of file ff.c.

References f_sync(), FR_OK, _FIL::fs, _FIL::id, and validate().

Referenced by DClose(), and MMCTask().

FRESULT f_getfree ( const char *  drv,
DWORD nclust,
FATFS **  fatfs 
)

FRESULT f_lseek ( FIL fp,
DWORD  ofs 
)

FRESULT f_mkdir ( const char *  path  ) 

FRESULT f_mount ( BYTE  drv,
FATFS fs 
)

Definition at line 795 of file ff.c.

References _DRIVES, FR_INVALID_DRIVE, FR_OK, and _FATFS::fs_type.

Referenced by MMCTask().

FRESULT f_open ( FIL fp,
const char *  path,
BYTE  mode 
)

FRESULT f_opendir ( DIR dj,
const char *  path 
)

FRESULT f_read ( FIL fp,
void *  buff,
UINT  btr,
UINT br 
)

FRESULT f_readdir ( DIR dj,
FILINFO finfo 
)

FRESULT f_rename ( const char *  path_old,
const char *  path_new 
)

FRESULT f_stat ( const char *  path,
FILINFO finfo 
)

Definition at line 1305 of file ff.c.

References auto_mount(), FR_INVALID_NAME, FR_OK, _DIR::fs, get_fileinfo(), and trace_path().

FRESULT f_sync ( FIL fp  ) 

FRESULT f_truncate ( FIL fp  ) 

FRESULT f_unlink ( const char *  path  ) 

FRESULT f_utime ( const char *  path,
const FILINFO finfo 
)

FRESULT f_write ( FIL fp,
const void *  buff,
UINT  btw,
UINT bw 
)

static DWORD get_cluster ( FATFS fs,
DWORD  clust 
) [static]

static void get_fileinfo ( FILINFO finfo,
const BYTE dir 
) [static]

static char make_dirfile ( const char **  path,
char *  dirname 
) [static]

Definition at line 437 of file ff.c.

References _USE_NTFLAG, _USE_SJIS, and memset().

Referenced by trace_path().

static BOOL move_window ( FATFS fs,
DWORD  sector 
) [static]

static BOOL next_dir_entry ( DIR dj  )  [static]

static BOOL put_cluster ( FATFS fs,
DWORD  clust,
DWORD  val 
) [static]

static BOOL remove_chain ( FATFS fs,
DWORD  clust 
) [static]

Definition at line 251 of file ff.c.

References FALSE, _FATFS::free_clust, get_cluster(), put_cluster(), and TRUE.

Referenced by f_open(), f_truncate(), and f_unlink().

static FRESULT reserve_direntry ( DIR dj,
BYTE **  dir 
) [static]

static FRESULT sync ( FATFS fs  )  [static]

static FRESULT trace_path ( DIR dj,
char *  fn,
const char *  path,
BYTE **  dir 
) [static]

static FRESULT validate ( const FATFS fs,
WORD  id 
) [static]


Variable Documentation

FATFS* FatFs[_DRIVES] [static]

Definition at line 69 of file ff.c.

WORD fsid [static]

Definition at line 71 of file ff.c.

Referenced by auto_mount().


Generated on Sun Aug 31 13:30:09 2008 for FrankenRTOS by  doxygen 1.5.6