The following functions, variables, structures, and macros are designated as internal to the library.
Functions
|
Name |
Description |
|
This function tries to merge adjacent segments that have not been allocated. The largest possible segment is merged if possible. | |
|
Load a file entry | |
|
Automatically store timestamp information from the RTCC | |
|
Helper function for FSchdir | |
|
Convert a cluster number to the corresponding sector | |
| ||
|
Create a new file entry | |
|
Create the first cluster for a file | |
|
Initialies the device and loads MBR and boot sector information | |
|
Erase a cluster | |
|
Erase a chain of clusters | |
|
Find the next available cluster on the device | |
|
This function will find an empty cluster on the device using the FATfindEmptyCluster function. It will then mark it as the last cluster in the file in the FAT chain, and link the current last cluster of the passed file to the new cluster. If the new cluster is a directory cluster, it will be erased (so there are no extraneous directory entries). If it's allocated to a non-directory file, it doesn't need to be erased; extraneous data in the cluster will be unviewable because of the file size parameter. | |
|
Create the first cluster of a file | |
|
Erase a file | |
|
Finds a file on the device | |
|
Step through a chain of clusters | |
|
Copy a file object | |
|
Loads file information from the device | |
|
FSrmdir helper function to erase dirs | |
|
Fill a file object with specified dir entry data | |
|
Find an empty dir entry | |
|
Flush unwritten data to a file | |
|
Format a dir name into dir entry format | |
|
Format a file name into dir entry format | |
|
FSfprintf helper function to write a char | |
|
Helper function for FSfprintf | |
|
Gets the cluster number from a directory entry | |
|
Get the file entry info for the parent dir of the specified dir | |
|
Automatically set the timestamp to "don't care" data | |
|
Load the boot sector and extract the necessary information | |
|
Load file information from a directory entry and cache the entry | |
|
Loads the MBR and extracts necessary information | |
|
Helper function for FSmkdir | |
|
Populate a dir entry with data | |
|
Read the next entry from the FAT | |
|
Helper function for FSrmdir | |
|
This function initializes the dynamic heap. It inserts segment headers to maximize segment space. | |
|
FSfprintf helper function to write a char multiple times | |
|
Validate the characters in a given file name | |
|
Write dir entry info into a specified entry | |
|
Create dot and dotdot entries in a non-root directory |
Macros
|
Name |
Description |
|
FSfprintf minus flag indicator | |
|
FSfprintf octothorpe (hash mark) flag indicator | |
|
FSfprintf plus flag indicator | |
|
FSfprintf signed flag indicator | |
|
FSfprintf space flag indicator | |
|
FSfprintf zero flag indicator | |
|
FSfprintf 8-bit argument size flag | |
|
FSfprintf 32-bit argument size flag | |
|
FSfprintf 64-bit argument size flag | |
|
FSfprintf 24-bit argument size flag | |
|
FSfprintf unspecified argument size flag | |
|
A macro used to determine the heap initialization size. | |
|
A macro used to determine the maximum size of a dynamic memory segment. | |
|
Value indicating that the CreateFileEntry function will be creating a directory | |
|
The number of directory entries in a sector | |
|
A macro used to specify the near-model action |
Structures
Types
Variables
|
Name |
Description |
|
The PIC18 dynamic memory heap | |
|
Global current working directory | |
|
Pointer to the current working directory | |
| ||
|
This string is used by dir functions to hold dir names temporarily | |
| ||
|
Global variable containing the cluster number of the root dir (0 for FAT12/16) | |
|
Global error variable. Set to one of many error codes after each function call. | |
|
Global variable indicating which file is using the data buffer | |
|
Global variable indicating that the data buffer contains all zeros | |
|
The global data sector buffer | |
|
Global structure containing device information. | |
|
The global FAT sector buffer | |
|
Array that contains file information (static allocation) | |
|
Array that indicates which elements of gFileArray are available for use | |
|
Global variable used for file operations. | |
|
Global variable indicating which data sector was read last | |
|
Global variable indicating which FAT sector was read last | |
|
Global variable indicating that there is information that needs to be written to the data section | |
|
Global variable indicating that there is information that needs to be written to the FAT | |
|
Global time variable (for timestamps) used to indicate last access date | |
|
Global time variable (for timestamps) used to indicate create date | |
|
Global time variable (for timestamps) used to indicate create time (milliseconds) | |
|
Global time variable (for timestamps) used to indicate create time | |
|
Global time variable (for timestamps) used to indicate last update date | |
|
Global time variable (for timestamps) used to indicate last update time | |
|
Global variable indicating that the entries in a directory align with a cluster boundary | |
|
Global variable used by the "recursive" FSrmdir function to indicate that additional cache reads are needed. | |
|
FSfprintf table of conversion digits | |
|
This array is used to prevent a stack frame error | |
|
Global variable used to store the calculated value of the cluster of a specified sector. | |
|
Global variable used to preserve the current working directory information. |