![]() |
RTOS_MSPM0
1.1
ECE445M starter code
|
high-level file system More...
Go to the source code of this file.
Functions | |
| int | eFile_Init (void) |
| Activate the file system, without formating. More... | |
| int | eFile_Format (void) |
| Format the disk. More... | |
| int | eFile_Mount (void) |
| Mount the disk. More... | |
| int | eFile_Create (const char name[]) |
| Create a new file. More... | |
| int | eFile_WOpen (const char name[]) |
| Open an existing file for writing. More... | |
| int | eFile_Write (const char data) |
| Write one byte. More... | |
| int | eFile_WriteString (const char *pt) |
| Write string. More... | |
| int | eFile_WriteUDec (uint32_t n) |
| int | eFile_WriteSDec (int32_t num) |
| int | eFile_WriteSFix2 (int32_t n) |
| int | eFile_WriteUFix2 (uint32_t num) |
| int | eFile_WClose (void) |
| Close the file that was being written. More... | |
| int | eFile_ROpen (const char name[]) |
| Open an existing file for reading. More... | |
| int | eFile_ReadNext (char *pt) |
| Retreive data from open file. More... | |
| uint32_t | eFileReadNextWord (uint32_t *pt) |
| Retreive data from open file. More... | |
| int | eFile_RClose (void) |
| Close the file that was being read. More... | |
| int | eFile_Delete (const char name[]) |
| delete this file More... | |
| int | eFile_DOpen (const char name[]) |
| int | eFile_DirNext (char *name[], unsigned long *size) |
| int | eFile_DClose (void) |
| int | eFile_Unmount (void) |
| Unmount the disk. More... | |
high-level file system
This file system sits on top of eDisk.
| int eFile_Create | ( | const char | name[] | ) |
Create a new file.
Create a new, empty file with one allocated block
| name | file name is an ASCII string up to seven characters |
| int eFile_DClose | ( | void | ) |
Close the directory
| none |
| int eFile_Delete | ( | const char | name[] | ) |
delete this file
Delete the file with this name, recover blocks so they can be used by another file
| name | file name is an ASCII string up to seven characters |
| int eFile_DirNext | ( | char * | name[], |
| unsigned long * | size | ||
| ) |
Retreive directory entry from open directory
| pointers | to return file name and size by reference |
| int eFile_DOpen | ( | const char | name[] | ) |
Open a (sub)directory, read into RAM
| directory | name is an ASCII string up to seven characters if subdirectories are supported (optional, empty sring for root directory) |
| int eFile_Format | ( | void | ) |
Format the disk.
Erase all files, create blank directory, initialize free space manager
| none |
| int eFile_Init | ( | void | ) |
Activate the file system, without formating.
This function must be called first, before calling any of the other eFile functions
| none |
| int eFile_Mount | ( | void | ) |
Mount the disk.
Mount disk and load file system metadata information
| none |
| int eFile_RClose | ( | void | ) |
Close the file that was being read.
Close the file, leave disk in a state power can be removed.
| none |
| int eFile_ReadNext | ( | char * | pt | ) |
Retreive data from open file.
Read one byte from disk into RAM
| pt | call by reference pointer to place to save data |
| int eFile_ROpen | ( | const char | name[] | ) |
Open an existing file for reading.
Open the file for reading, read first block into RAM
| name | file name is an ASCII string up to seven characters |
| int eFile_Unmount | ( | void | ) |
Unmount the disk.
Unmount and deactivate the file system.
| none |
| int eFile_WClose | ( | void | ) |
Close the file that was being written.
Close the file, leave disk in a state power can be removed. This function will flush all RAM buffers to the disk.
| none |
| int eFile_WOpen | ( | const char | name[] | ) |
Open an existing file for writing.
Open the file for writing, read into RAM last block
| name | file name is an ASCII string up to seven characters |
| int eFile_Write | ( | const char | data | ) |
Write one byte.
Save one byte at end of the open file
| data | byte to be saved on the disk |
| int eFile_WriteString | ( | const char * | pt | ) |
Write string.
Save string at end of the open file
| pt | pointer to string to be saved |
| uint32_t eFileReadNextWord | ( | uint32_t * | pt | ) |
Retreive data from open file.
Read one 32-bit word from disk into RAM, little endian
| pt | call by reference pointer to place to save data |