Classes | Macros | Typedefs | Enumerations | Functions
ff.h File Reference
#include <stdarg.h>
#include "integer.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.

Classes

struct  DIR
 
struct  FATFS
 
struct  FIL
 
struct  FILINFO
 

Macros

#define _FATFS   6502 /* Revision ID */
 
#define _T(x)   x
 
#define _TEXT(x)   x
 
#define AM_ARC   0x20 /* Archive */
 
#define AM_DIR   0x10 /* Directory */
 
#define AM_HID   0x02 /* Hidden */
 
#define AM_LFN   0x0F /* LFN entry */
 
#define AM_MASK   0x3F /* Mask of defined bits */
 
#define AM_RDO   0x01 /* Read only */
 
#define AM_SYS   0x04 /* System */
 
#define AM_VOL   0x08 /* Volume label */
 
#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) /* Each logical drive is bound to the same physical drive number */
 
#define LD2PT(vol)   0 /* Always mounts the 1st partition or in SFD */
 
#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 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)
 

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, FR_INVALID_PARAMETER
}
 

Functions

FRESULT f_chdir (const TCHAR *)
 
FRESULT f_chdrive (BYTE)
 
FRESULT f_chmod (const TCHAR *, BYTE, BYTE)
 
FRESULT f_close (FIL *)
 
FRESULT f_fdisk (BYTE, const DWORD[], void *)
 
FRESULT f_forward (FIL *, UINT(*)(const BYTE *, UINT), UINT, UINT *)
 
FRESULT f_getcwd (TCHAR *, UINT)
 
FRESULT f_getfree (const TCHAR *, DWORD *, FATFS **)
 
TCHARf_gets (TCHAR *, int, FIL *)
 
FRESULT f_lseek (FIL *, DWORD)
 
FRESULT f_mkdir (const TCHAR *)
 
FRESULT f_mkfs (BYTE, BYTE, UINT)
 
FRESULT f_mount (BYTE, FATFS *)
 
FRESULT f_open (FIL *, const TCHAR *, BYTE)
 
FRESULT f_opendir (DIR *, 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 (DIR *, 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 *)
 
int f_vprintf (FIL *, const TCHAR *, va_list arp)
 
FRESULT f_write (FIL *, const void *, UINT, UINT *)
 
WCHAR ff_convert (WCHAR, UINT)
 
WCHAR ff_wtoupper (WCHAR)
 
DWORD get_fattime (void)
 Current time returned is packed into a DWORD value. More...
 

Macro Definition Documentation

◆ _FATFS

#define _FATFS   6502 /* Revision ID */

Definition at line 19 of file ff.h.

◆ _T

#define _T (   x)    x

Definition at line 68 of file ff.h.

◆ _TEXT

#define _TEXT (   x)    x

Definition at line 69 of file ff.h.

◆ AM_ARC

#define AM_ARC   0x20 /* Archive */

Definition at line 311 of file ff.h.

◆ AM_DIR

#define AM_DIR   0x10 /* Directory */

Definition at line 310 of file ff.h.

◆ AM_HID

#define AM_HID   0x02 /* Hidden */

Definition at line 306 of file ff.h.

◆ AM_LFN

#define AM_LFN   0x0F /* LFN entry */

Definition at line 309 of file ff.h.

◆ AM_MASK

#define AM_MASK   0x3F /* Mask of defined bits */

Definition at line 312 of file ff.h.

◆ AM_RDO

#define AM_RDO   0x01 /* Read only */

Definition at line 305 of file ff.h.

◆ AM_SYS

#define AM_SYS   0x04 /* System */

Definition at line 307 of file ff.h.

◆ AM_VOL

#define AM_VOL   0x08 /* Volume label */

Definition at line 308 of file ff.h.

◆ CREATE_LINKMAP

#define CREATE_LINKMAP   0xFFFFFFFF

Definition at line 316 of file ff.h.

◆ EOF

#define EOF   (-1)

Definition at line 241 of file ff.h.

◆ f_eof

#define f_eof (   fp)    (((fp)->fptr == (fp)->fsize) ? 1 : 0)

Definition at line 235 of file ff.h.

◆ f_error

#define f_error (   fp)    (((fp)->flag & FA__ERROR) ? 1 : 0)

Definition at line 236 of file ff.h.

◆ f_size

#define f_size (   fp)    ((fp)->fsize)

Definition at line 238 of file ff.h.

◆ f_tell

#define f_tell (   fp)    ((fp)->fptr)

Definition at line 237 of file ff.h.

◆ FA__DIRTY

#define FA__DIRTY   0x40

Definition at line 292 of file ff.h.

◆ FA__ERROR

#define FA__ERROR   0x80

Definition at line 284 of file ff.h.

◆ FA__WRITTEN

#define FA__WRITTEN   0x20

Definition at line 291 of file ff.h.

◆ FA_CREATE_ALWAYS

#define FA_CREATE_ALWAYS   0x08

Definition at line 289 of file ff.h.

◆ FA_CREATE_NEW

#define FA_CREATE_NEW   0x04

Definition at line 288 of file ff.h.

◆ FA_OPEN_ALWAYS

#define FA_OPEN_ALWAYS   0x10

Definition at line 290 of file ff.h.

◆ FA_OPEN_EXISTING

#define FA_OPEN_EXISTING   0x00

Definition at line 283 of file ff.h.

◆ FA_READ

#define FA_READ   0x01

Definition at line 282 of file ff.h.

◆ FA_WRITE

#define FA_WRITE   0x02

Definition at line 287 of file ff.h.

◆ FS_FAT12

#define FS_FAT12   1

Definition at line 298 of file ff.h.

◆ FS_FAT16

#define FS_FAT16   2

Definition at line 299 of file ff.h.

◆ FS_FAT32

#define FS_FAT32   3

Definition at line 300 of file ff.h.

◆ LD2PD

#define LD2PD (   vol)    (vol) /* Each logical drive is bound to the same physical drive number */

Definition at line 46 of file ff.h.

◆ LD2PT

#define LD2PT (   vol)    0 /* Always mounts the 1st partition or in SFD */

Definition at line 47 of file ff.h.

◆ LD_DWORD

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

Definition at line 330 of file ff.h.

◆ LD_WORD

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

Definition at line 329 of file ff.h.

◆ ST_DWORD

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

Definition at line 332 of file ff.h.

◆ ST_WORD

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

Definition at line 331 of file ff.h.

Typedef Documentation

◆ TCHAR

typedef char TCHAR

Definition at line 67 of file ff.h.

Enumeration Type Documentation

◆ FRESULT

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 
FR_INVALID_PARAMETER 

Definition at line 178 of file ff.h.

Function Documentation

◆ f_chdir()

FRESULT f_chdir ( const TCHAR )

◆ f_chdrive()

FRESULT f_chdrive ( BYTE  )

◆ f_fdisk()

FRESULT f_fdisk ( BYTE  ,
const DWORD  [],
void *   
)

◆ f_forward()

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

◆ f_getcwd()

FRESULT f_getcwd ( TCHAR ,
UINT   
)

◆ f_gets()

TCHAR* f_gets ( TCHAR ,
int  ,
FIL  
)

◆ f_mkfs()

FRESULT f_mkfs ( BYTE  ,
BYTE  ,
UINT   
)

◆ f_printf()

int f_printf ( FIL ,
const TCHAR ,
  ... 
)

◆ f_putc()

int f_putc ( TCHAR  ,
FIL  
)

◆ f_puts()

int f_puts ( const TCHAR ,
FIL  
)

◆ f_vprintf()

int f_vprintf ( FIL ,
const TCHAR ,
va_list  arp 
)

◆ ff_convert()

WCHAR ff_convert ( WCHAR  ,
UINT   
)

Definition at line 501 of file ccsbcs.c.

◆ ff_wtoupper()

WCHAR ff_wtoupper ( WCHAR  )

Definition at line 528 of file ccsbcs.c.

◆ get_fattime()

DWORD get_fattime ( void  )

Current time returned is packed into a DWORD value.

The bit field is as follows:

bit31:25 Year from 1980 (0..127)

bit24:21 Month (1..12)

bit20:16 Day in month(1..31)

bit15:11 Hour (0..23)

bit10:5 Minute (0..59)

bit4:0 Second (0..29)

Returns
Current time.

Definition at line 57 of file fattime_rtc.c.



inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:05