PropWare
C++ objects and CMake build system for Parallax Propeller
|
#include <fatfs.h>
Public Types | |
enum | ErrorCode { NO_ERROR = 0, BEG_ERROR = Filesystem::END_ERROR + 1, EMPTY_FAT_ENTRY = BEG_ERROR, INVALID_FAT_APPEND, TOO_MANY_FATS, BAD_SECTORS_PER_CLUSTER, READING_PAST_EOC, PARTITION_DOES_NOT_EXIST, UNSUPPORTED_FILESYSTEM, END_ERROR = UNSUPPORTED_FILESYSTEM } |
Public Member Functions | |
FatFS (const BlockStorage *driver, const Printer *logger=&pwOut) | |
Constructor. More... | |
~FatFS () | |
Destructor. Unmounts the filesystem and flushes all buffers. | |
PropWare::ErrorCode | mount (const uint8_t partition=0) |
PropWare::ErrorCode | unmount () |
uint8_t | get_fs_type () |
Determine whether the mounted filesystem is FAT16 or FAT32. More... | |
Static Public Member Functions | |
static void | print_error_str (const Printer &printer, const ErrorCode err) |
If an error occurs, this method can be used to determine what that error actually means. More... | |
Static Public Attributes | |
static const int | FOLDER_ID = INT32_MAX |
Friends | |
class | FatFile |
class | FatFileReader |
class | FatFileWriter |
FAT 16/32 filesystem driver - can be used with SD cards or any other PropWare::BlockStorage device
PropWare::FatFS::FatFS | ( | const BlockStorage * | driver, |
const Printer * | logger = &pwOut |
||
) |
Constructor.
[in] | *driver | Address of a the driver which is capable of reading the physical hardware. Commonly, this would be an instance of PropWare::SD, but one could potentially write a driver for a floppy disk or CD driver or any other block storage device |
[in] | *logger | Useful for debugging, a logger can be given to help determine when something goes wrong. All code using the logger will be optimized out by GCC so long as you only call public method |
uint8_t PropWare::FatFS::get_fs_type | ( | ) |
|
virtual |
Implements PropWare::Filesystem.
|
staticinherited |
If an error occurs, this method can be used to determine what that error actually means.
[in] | printer | Where the error should be printed |
[in] | err | The error code that was thrown |
Definition at line 77 of file filesystem.h.
|
virtual |
Implements PropWare::Filesystem.
Definition at line 135 of file fatfs.h.