Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
%DASHBOARD{ section="banner" | ||||||||
Line: 221 to 221 | ||||||||
Changed: | ||||||||
< < | TBC Based on FatFs - Generic FAT Filesystem Module | |||||||
> > | Based on FatFs - Generic FAT Filesystem Module. FAT32 and exFAT | |||||||
Forth source files | ||||||||
Added: | ||||||||
> > | FAT Filesystem APIThe C function prototype forf_open looks like this:
FRESULT f_open ( FIL* fp, /* [OUT] Pointer to the file object structure */ const TCHAR* path, /* [IN] File name */ BYTE mode /* [IN] Mode flags */ );The parameter order for the Forth Word is the same: a1 is address of the file object structure, a2 is the address of the filename array (0 terminated string). f_open ( a1 a2 w -- u ) opens a file. typedef struct { FFOBJID obj; /* Object identifier */ BYTE flag; /* File object status flags */ BYTE err; /* Abort flag (error code) */ FSIZE_t fptr; /* File read/write pointer (Byte offset origin from top of the file) */ DWORD clust; /* Current cluster of fptr (One cluster behind if fptr is on the cluster boundary. Invalid if fptr == 0.) */ LBA_t sect; /* Current data sector (Can be invalid if fptr is on the cluster boundary.)*/ #if !FF_FS_READONLY LBA_t dir_sect; /* Sector number containing the directory entry */ BYTE* dir_ptr; /* Ponter to the directory entry in the window */ #endif #if FF_USE_FASTSEEK DWORD* cltbl; /* Pointer to the cluster link map table (Nulled on file open. Set by application.) */ #endif #if !FF_FS_TINY BYTE buf[FF_MAX_SS]; /* File private data transfer buffer (Always valid if fptr is not on the sector boundary but can be invalid if fptr is on the sector boundary.) */ #endif } FIL; FIL name ( -- a ) creates a file objectSee also f_open File Access
Directory Access
File and Directory Management
Volume Management and System Configuration
FAT Filesystem UNIX like Shell Commands
| |||||||