Collaboration diagram for PHAT File System:
Modules | |
Volume Support | |
Dealing with volumes. | |
Directory Support | |
Routines for reading and writing directories. | |
PHAT12 Support | |
PHAT12 specific routines. | |
PHAT16 Support | |
PHAT16 specific routines. | |
PHAT32 Support | |
PHAT32 specific routines. | |
PHAT Block I/O | |
Reading and writing data blocks. | |
PHAT Utilities | |
General utility routines used by the PHAT file system. | |
PHAT Debugging Support | |
Listing various PHAT structures. | |
Data Structures | |
struct | _PHATFILE |
PHAT file descriptor structure. More... | |
File attributes. | |
#define | PHAT_FATTR_RDONLY 0x01 |
#define | PHAT_FATTR_HIDDEN 0x02 |
#define | PHAT_FATTR_SYSTEM 0x04 |
#define | PHAT_FATTR_VOLID 0x08 |
#define | PHAT_FATTR_DIR 0x10 |
#define | PHAT_FATTR_ARCHIV 0x20 |
#define | PHAT_FATTR_LFN (PHAT_FATTR_RDONLY | PHAT_FATTR_HIDDEN | PHAT_FATTR_SYSTEM | PHAT_FATTR_VOLID) |
#define | PHAT_FATTR_FILEMASK 0x37 |
Defines | |
#define | PHATEOC 0x0FFFFFF8 |
Marks end of cluster chain. | |
Typedefs | |
typedef _PHATFILE | PHATFILE |
PHAT file descriptor structure. | |
Functions | |
u_long | AllocFirstCluster (NUTFILE *nfp) |
Allocate the first cluster of a file. | |
NUTFILE * | PhatFileOpen (NUTDEVICE *dev, CONST char *path, int mode, int acc) |
Open a file. | |
int | PhatFileClose (NUTFILE *nfp) |
Close a file. | |
int | PhatFileWrite (NUTFILE *nfp, CONST void *buffer, int len) |
Write data to a file. | |
int | PhatFileWrite_P (NUTFILE *nfp, PGM_P buffer, int len) |
Write data from program space to a file. | |
int | PhatFileRead (NUTFILE *nfp, void *buffer, int size) |
Read data from a file. | |
Variables | |
NUTDEVICE | devPhat0 |
PHAT file system driver information structure. | |
NUTDEVICE | devPhat1 |
NUTDEVICE | devPhat0 |
PHAT file system driver information structure. | |
NUTDEVICE | devPhat1 |
|
Read only file. |
|
Hidden file. |
|
System file. |
|
No file, but a volume label. |
|
File contains a subdirectory. |
|
File is not archived. This flag will be set when the file is created or modified. |
|
Long filename entry. |
|
Only these flags are allowed for files and directories. |
|
Allocate the first cluster of a file.
|
|
Open a file. This function is called by the low level open routine of the C runtime library, using the _NUTDEVICE::dev_open entry.
|
|
Close a file.
|
|
Write data to a file.
|
|
Write data from program space to a file. This function is not yet implemented and will always return -1. Similar to PhatFileWrite() except that the data is located in program memory.
|
|
Read data from a file.
|
|
PHAT file system driver information structure. A pointer to this structure must be passed to NutRegisterDevice() to bind this file system driver to the Nut/OS kernel. An application may then call /verbatim _open("MMC0:1/PHAT0", _O_RDWR | _O_BINARY); /endverbatim to mount partition 1 on the previously registered block device (devMmc0 in this example). |
|
Initial value: { 0, {'P', 'H', 'A', 'T', '0', 0, 0, 0, 0} , IFTYP_FS, 0, 0, 0, 0, PhatInit, PhatApiIOCtl, PhatApiFileRead, PhatApiFileWrite, PhatApiFileWrite_P, PhatApiFileOpen, PhatApiFileClose, PhatFileSize } A pointer to this structure must be passed to NutRegisterDevice() to bind this file system driver to the Nut/OS kernel. An application may then call /verbatim _open("MMC0:1/PHAT0", _O_RDWR | _O_BINARY); /endverbatim to mount partition 1 on the previously registered block device (devMmc0 in this example). |
|
Initial value: { 0, {'P', 'H', 'A', 'T', '1', 0, 0, 0, 0} , IFTYP_FS, 0, 0, 0, 0, PhatInit, PhatApiIOCtl, PhatApiFileRead, PhatApiFileWrite, PhatApiFileWrite_P, PhatApiFileOpen, PhatApiFileClose, PhatFileSize } |