Storage Class Reference
#include <storage.hpp>
Static Public Member Functions | |
static FileSystemObject & | getFlashDrive () |
static FileSystemObject & | getSDDrive () |
static FRESULT | copy (const char *pExistingFile, const char *pNewFile, unsigned int *pReadTime=0, unsigned int *pWriteTime=0, unsigned int *pBytesTransferred=0) |
static FRESULT | read (const char *pFilename, void *pData, unsigned int bytesToRead, unsigned int offset=0) |
static FRESULT | write (const char *pFilename, void *pData, unsigned int bytesToWrite, unsigned int offset=0) |
static FRESULT | append (const char *pFilename, const void *pData, unsigned int bytesToAppend, unsigned int offset=0) |
Detailed Description
Storage class contains the File System Objects
This class contains the File System Objects for the SD Card and SPI Flash. There are mainly two functionalities provided:
- File IO (Read/Write/Append)
- File System Object manipulation (Mount/Format etc).
The FileSystemObject can only be obtained from this class that provides further access to the drive system.
Member Function Documentation
|
static |
Appends an existing file (creates a new file if it doesn't exist)
- Parameters
-
pFilename The filename to append data to pData The buffer to write the file data from bytesToAppend Number of bytes to append offset If offset is non-zero, data is written to this offset. If offset is not specified or zero, data is appended at the end of the file.
|
static |
Copies a file
- Parameters
-
pExistingFile Existing file name pNewFile New file name pReadTime Optional: Provide pointer to get the time taken to read the file pWriteTime Optional: Provide pointer to get the time taken to write the file pBytesTransferred Optional: Provide pointer to get number of bytes transferred
|
inlinestatic |
- Returns
- Single Flash Drive Object Reference
|
inlinestatic |
- Returns
- Single SD Card Drive Object reference
|
static |
Reads an existing file
- Parameters
-
pFilename The filename to read pData The buffer to save the file data bytesToRead Number of bytes to read offset Optional Parameter: file offset to read data from
|
static |
Writes an existing file.
- Parameters
-
pFilename The filename to write pData The buffer to write the file data from bytesToWrite Number of bytes to write offset Optional Parameter: file offset to write data to file
The documentation for this class was generated from the following files:
- /var/www/html/SJSU-DEV-Linux/firmware/default/lib/L4_IO/storage.hpp
- /var/www/html/SJSU-DEV-Linux/firmware/default/lib/L4_IO/src/storage.cpp