Difference: MicroSdBlocks (21 vs. 22)

Revision 222020-08-09 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
%DASHBOARD{ section="banner"
Line: 247 to 247
 );
Changed:
<
<
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).
>
>
The parameter order for the Forth Word is the same: a1 is address of the file object data structure FIL, a2 is the address of the filename array (0 terminated string).
 

Changed:
<
<
f_open ( a1 a2 w -- u ) opens a file.
>
>
f_open ( a1 a2 b -- u ) opens a file.
 
Added:
>
>
The FIL data structure can be created as follows:
 

Changed:
<
<
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;
>
>
create fil #fil allot
 
Added:
>
>
See also f_open.

Data Structures

FATFS

FATFS
 

Changed:
<
<
FIL name ( -- a ) creates a file object
>
>
FATFS { 1fs_type 1drv 1n_fats 1wflag 1fsi_flag 2id 2n_rootdir 2csize 2ssize 4lfnbuf 4dirbuf 4sobj 4last_clst 4free_clst 4cdir 4cdc_scl 4cdc_size 4cdc_ofs 4n_fatent 4fsize 4volbase 4fatbase 4dirbase 4database 4winsect 512win }
 
Changed:
<
<
See also f_open
>
>

FIL

FIL

_FDID { 4fs 2id 1attr 1stat 4sclust 4objsize 4n_cont 4n_frag 4c_scl 4c_size 4c_ofs 4lockid } 40

FIL { 40obj 1flag 1err 4fptr 4clust 4sect 4dir_sect 4dir_ptr 4cltbl 512buf } 582

DIR

DIR DIR { }

FILINFO

FILINFO FILINFO { }

 
Changed:
<
<

File Access

>
>

File Access Functions/Words

 
Line: 298 to 304
 
  • f_size - Get size
  • f_error - Test for an error
Changed:
<
<

Directory Access

>
>

Directory Access Functions/Words

 
  • f_opendir - Open a directory
  • f_closedir - Close an open directory
  • f_readdir - Read a directory item
  • f_findfirst - Open a directory and read the first item matched
  • f_findnext - Read a next item matched
Changed:
<
<

File and Directory Management

>
>

File and Directory Management Functions/Words

 
  • f_stat - Check existance of a file or sub-directory
  • f_unlink - Remove a file or sub-directory
  • f_rename - Rename/Move a file or sub-directory
Line: 316 to 322
 
  • f_chdrive - Change current drive
  • f_getcwd - Retrieve the current directory and drive
Changed:
<
<

Volume Management and System Configuration

>
>

Volume Management and System Configuration Functions/Words

 
  • f_mount - Register/Unregister the work area of the volume
  • f_mkfs - Create an FAT volume on the logical drive
  • f_fdisk - Create partitions on the physical drive
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback