All Functions and Procedures

Name Unit Description
disk_initialize disk_io

Initialize Disk Drive

disk_readp disk_io

Read Partial Sector

disk_writep disk_io

Write Partial Sector

pf_lseek pff

Move file pointer of the open file

The pf_lseek() function moves the file read/write pointer of the open file. The ofs can be specified in only origin from top of the file.

pf_mount pff

Mount/Unmount a logical Drive

The pf_mount() function registers a work area to the Petit FatFs module. The volume is mounted on registration. The volume must be mounted with this function prior to use any file function and after every media changes.

pf_open pff

Opens an existing file

The file must be opend prior to use pf_read and pf_lseek function. The open file is valid until next open.

pf_opendir pff

Create a directory Object.

The pf_opendir() function opens an exsisting directory and creates the directory object for subsequent calls. The directory object structure can be discarded at any time without any procedure.

pf_read pff

Read data from the open file.

The file read/write pointer in the file system object advances in number of bytes read. After the function succeeded, br should be checked to detect end of file. In case of br is less than btr, it means the read pointer has reached end of the file during read operation. If a null pointer is given to the buff, the read data bytes are forwarded to the outgoing stream instead of the memory. The streaming function depends on each project will be typically built-in the disk_readp function.

pf_readdir pff

Read a directory item from the open directory.

The pf_readdir() function reads directory entries in sequence. All items in the directory can be read by calling this function repeatedly. When all directory entries have been read and no item to read, the function returns a null string into member f_name[] in the file information structure without error.

pf_rewinddir pff

Directory rewind.

pf_write pff

Write data to the open file. The write function has some restrictions listed below:

Cannot create file. Only existing file can be written. Cannot expand file size. Cannot update time stamp of the file. Write operation can start/stop on the sector boundary only. Read-only attribute of the file cannot block write operation.

The read/write pointer in the file system object advances in number of bytes written. After the function succeeded, bw should be checked to detect end of file. In case of bw is less than btw, it means the read/write pointer reached end of file during the write operation. Once a write operation is initiated, it must be finalized properly, or the written data can be lost.


Generated by PasDoc 0.15.0.