Access FAT16 and FAT32 volumes on SD and SDHC cards.
#include <SdVolume.h>
|
class | SdFile |
|
class | SdBaseFile |
|
◆ SdVolume()
◆ blocksPerCluster()
uint8_t SdVolume::blocksPerCluster |
( |
| ) |
const |
|
inline |
- Returns
- The volume's cluster size in blocks.
◆ blocksPerFat()
uint32_t SdVolume::blocksPerFat |
( |
| ) |
const |
|
inline |
- Returns
- The number of blocks in one FAT.
◆ cacheClear()
Clear the cache and returns a pointer to the cache. Used by the WaveRP recorder to do raw write to the SD card. Not for normal apps.
- Returns
- A pointer to the cache buffer or zero if an error occurs.
◆ clusterCount()
uint32_t SdVolume::clusterCount |
( |
| ) |
const |
|
inline |
- Returns
- The total number of clusters in the volume.
◆ clusterSizeShift()
uint8_t SdVolume::clusterSizeShift |
( |
| ) |
const |
|
inline |
- Returns
- The shift count required to multiply by blocksPerCluster.
◆ dataStartBlock()
uint32_t SdVolume::dataStartBlock |
( |
| ) |
const |
|
inline |
- Returns
- The logical block number for the start of file data.
◆ dbgFat()
bool SdVolume::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
◆ fatCount()
uint8_t SdVolume::fatCount |
( |
| ) |
const |
|
inline |
- Returns
- The number of FAT structures on the volume.
◆ fatStartBlock()
uint32_t SdVolume::fatStartBlock |
( |
| ) |
const |
|
inline |
- Returns
- The logical block number for the start of the first FAT.
◆ fatType()
uint8_t SdVolume::fatType |
( |
| ) |
const |
|
inline |
- Returns
- The FAT type of the volume. Values are 12, 16 or 32.
◆ freeClusterCount()
int32_t SdVolume::freeClusterCount |
( |
| ) |
|
Volume free space in clusters.
- Returns
- Count of free clusters for success or -1 if an error occurs.
◆ init() [1/4]
bool SdVolume::init |
( |
Sd2Card & |
dev | ) |
|
|
inline |
◆ init() [2/4]
bool SdVolume::init |
( |
Sd2Card & |
dev, |
|
|
uint8_t |
part |
|
) |
| |
|
inline |
◆ init() [3/4]
bool SdVolume::init |
( |
Sd2Card * |
dev | ) |
|
|
inline |
Initialize a FAT volume. Try partition one first then try super floppy format.
- Parameters
-
[in] | dev | The Sd2Card where the volume is located. |
- Returns
- The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include not finding a valid partition, not finding a valid FAT file system or an I/O error.
◆ init() [4/4]
bool SdVolume::init |
( |
Sd2Card * |
dev, |
|
|
uint8_t |
part |
|
) |
| |
Initialize a FAT volume.
- Parameters
-
[in] | dev | The SD card where the volume is located. |
[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 block zero. |
- Returns
- The value one, true, is returned for success and the value zero, false, is returned for failure. Reasons for failure include not finding a valid partition, not finding a valid FAT file system in the specified partition or an I/O error.
◆ rootDirEntryCount()
uint32_t SdVolume::rootDirEntryCount |
( |
| ) |
const |
|
inline |
- Returns
- The number of entries in the root directory for FAT16 volumes.
◆ rootDirStart()
uint32_t SdVolume::rootDirStart |
( |
| ) |
const |
|
inline |
- Returns
- The logical block number for the start of the root directory on FAT16 volumes or the first cluster number on FAT32 volumes.
◆ sdCard()
The documentation for this class was generated from the following files: