Access FAT16 and FAT32 partitions on raw file devices.
More...
#include <FatPartition.h>
|
class | FatCache |
|
class | FatFile |
|
Access FAT16 and FAT32 partitions on raw file devices.
FatPartition::FatPartition |
( |
| ) |
|
|
inline |
uint16_t FatPartition::bytesPerCluster |
( |
| ) |
|
|
inline |
- Returns
- Number of bytes in a cluster.
uint8_t FatPartition::bytesPerClusterShift |
( |
| ) |
|
|
inline |
- Returns
- The shift count required to multiply by bytesPerCluster.
uint16_t FatPartition::bytesPerSector |
( |
| ) |
|
|
inline |
- Returns
- Number of bytes per sector.
uint8_t FatPartition::bytesPerSectorShift |
( |
| ) |
|
|
inline |
- Returns
- The shift count required to multiply by bytesPerCluster.
cache_t* FatPartition::cacheClear |
( |
| ) |
|
|
inline |
Clear the cache and returns a pointer to the cache. Not for normal apps.
- Returns
- A pointer to the cache buffer or zero if an error occurs.
uint32_t FatPartition::clusterCount |
( |
| ) |
const |
|
inline |
- Returns
- The total number of clusters in the volume.
uint32_t FatPartition::dataStartSector |
( |
| ) |
const |
|
inline |
- Returns
- The logical sector number for the start of file data.
int8_t FatPartition::dbgFat |
( |
uint32_t |
n, |
|
|
uint32_t * |
v |
|
) |
| |
|
inline |
Debug access to FAT table
- Parameters
-
[in] | n | cluster number. |
[out] | v | value of entry |
- Returns
- true for success or false for failure
uint8_t FatPartition::fatCount |
( |
| ) |
|
|
inline |
- Returns
- The number of File Allocation Tables.
uint32_t FatPartition::fatStartSector |
( |
| ) |
const |
|
inline |
- Returns
- The logical sector number for the start of the first FAT.
uint8_t FatPartition::fatType |
( |
| ) |
const |
|
inline |
- Returns
- The FAT type of the volume. Values are 12, 16 or 32.
int32_t FatPartition::freeClusterCount |
( |
| ) |
|
Volume free space in clusters.
- Returns
- Count of free clusters for success or -1 if an error occurs.
bool FatPartition::init |
( |
BlockDevice * |
dev, |
|
|
uint8_t |
part |
|
) |
| |
Initialize a FAT partition.
- Parameters
-
[in] | dev | BlockDevice for this partition. |
[in] | part | The partition to be used. Legal values for part are 1-4 to use the corresponding partition on a device formatted with a MBR, Master Boot Record, or zero if the device is formatted as a super floppy with the FAT boot sector in sector zero. |
- Returns
- The value true is returned for success and the value false is returned for failure.
uint16_t FatPartition::rootDirEntryCount |
( |
| ) |
const |
|
inline |
- Returns
- The number of entries in the root directory for FAT16 volumes.
uint32_t FatPartition::rootDirStart |
( |
| ) |
const |
|
inline |
- Returns
- The logical sector number for the start of the root directory on FAT16 volumes or the first cluster number on FAT32 volumes.
uint16_t FatPartition::sectorMask |
( |
| ) |
|
|
inline |
- Returns
- Mask for sector offset.
uint8_t FatPartition::sectorsPerCluster |
( |
| ) |
const |
|
inline |
- Returns
- The volume's cluster size in sectors.
uint8_t FatPartition::sectorsPerClusterShift |
( |
| ) |
const |
|
inline |
- Returns
- The shift count required to multiply by sectorsPerCluster.
uint32_t FatPartition::sectorsPerFat |
( |
| ) |
const |
|
inline |
- Returns
- The number of sectors in one FAT.
uint32_t FatPartition::volumeSectorCount |
( |
| ) |
const |
|
inline |
- Returns
- The number of sectors in the volume
bool FatPartition::wipe |
( |
print_t * |
pr = nullptr | ) |
|
Wipe all data from the volume.
- Parameters
-
[in] | pr | print stream for status dots. |
- Returns
- true for success else false.
The documentation for this class was generated from the following files:
- ArduinoSdFs/libraries/SdFs/src/FatLib/FatPartition.h
- ArduinoSdFs/libraries/SdFs/src/FatLib/FatPartition.cpp