ESP8266
|
Access FAT16 and FAT32 volumes on SD and SDHC cards. More...
Public Member Functions | |
SdVolume (void) | |
uint8_t | init (Sd2Card *dev) |
uint8_t | init (Sd2Card *dev, uint8_t part) |
uint8_t | blocksPerCluster (void) const |
uint32_t | blocksPerFat (void) const |
uint32_t | clusterCount (void) const |
uint8_t | clusterSizeShift (void) const |
uint32_t | dataStartBlock (void) const |
uint8_t | fatCount (void) const |
uint32_t | fatStartBlock (void) const |
uint8_t | fatType (void) const |
uint32_t | rootDirEntryCount (void) const |
uint32_t | rootDirStart (void) const |
uint8_t | init (Sd2Card &dev) |
uint8_t | init (Sd2Card &dev, uint8_t part) |
Static Public Member Functions | |
static uint8_t * | cacheClear (void) |
static Sd2Card * | sdCard (void) |
Private Member Functions | |
uint8_t | allocContiguous (uint32_t count, uint32_t *curCluster) |
uint8_t | blockOfCluster (uint32_t position) const |
uint32_t | clusterStartBlock (uint32_t cluster) const |
uint32_t | blockNumber (uint32_t cluster, uint32_t position) const |
uint8_t | chainSize (uint32_t beginCluster, uint32_t *size) const |
uint8_t | fatGet (uint32_t cluster, uint32_t *value) const |
uint8_t | fatPut (uint32_t cluster, uint32_t value) |
uint8_t | fatPutEOC (uint32_t cluster) |
uint8_t | freeChain (uint32_t cluster) |
uint8_t | isEOC (uint32_t cluster) const |
uint8_t | readBlock (uint32_t block, uint8_t *dst) |
uint8_t | readData (uint32_t block, uint16_t offset, uint16_t count, uint8_t *dst) |
uint8_t | writeBlock (uint32_t block, const uint8_t *dst) |
Static Private Member Functions | |
static uint8_t | cacheFlush (void) |
static uint8_t | cacheRawBlock (uint32_t blockNumber, uint8_t action) |
static void | cacheSetDirty (void) |
static uint8_t | cacheZeroBlock (uint32_t blockNumber) |
Private Attributes | |
uint32_t | allocSearchStart_ |
uint8_t | blocksPerCluster_ |
uint32_t | blocksPerFat_ |
uint32_t | clusterCount_ |
uint8_t | clusterSizeShift_ |
uint32_t | dataStartBlock_ |
uint8_t | fatCount_ |
uint32_t | fatStartBlock_ |
uint8_t | fatType_ |
uint16_t | rootDirEntryCount_ |
uint32_t | rootDirStart_ |
Static Private Attributes | |
static uint8_t const | CACHE_FOR_READ = 0 |
static uint8_t const | CACHE_FOR_WRITE = 1 |
static cache_t | cacheBuffer_ |
static uint32_t | cacheBlockNumber_ = 0XFFFFFFFF |
static Sd2Card * | sdCard_ |
static uint8_t | cacheDirty_ = 0 |
static uint32_t | cacheMirrorBlock_ = 0 |
Access FAT16 and FAT32 volumes on SD and SDHC cards.
SdVolume::SdVolume | ( | void | ) |
Create an instance of SdVolume
|
private |
|
private |
|
private |
uint8_t SdVolume::blocksPerCluster | ( | void | ) | const |
uint32_t SdVolume::blocksPerFat | ( | void | ) | const |
|
static |
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.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
uint32_t SdVolume::clusterCount | ( | void | ) | const |
uint8_t SdVolume::clusterSizeShift | ( | void | ) | const |
|
private |
uint32_t SdVolume::dataStartBlock | ( | void | ) | const |
uint8_t SdVolume::fatCount | ( | void | ) | const |
|
private |
|
private |
|
private |
uint32_t SdVolume::fatStartBlock | ( | void | ) | const |
uint8_t SdVolume::fatType | ( | void | ) | const |
|
private |
uint8_t SdVolume::init | ( | Sd2Card * | dev | ) |
Initialize a FAT volume. Try partition one first then try super floppy format.
[in] | dev | The Sd2Card where the volume is located. |
uint8_t SdVolume::init | ( | Sd2Card * | dev, |
uint8_t | part | ||
) |
Initialize a FAT volume.
[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. |
uint8_t SdVolume::init | ( | Sd2Card & | dev | ) |
uint8_t SdVolume::init | ( | Sd2Card & | dev, |
uint8_t | part | ||
) |
|
private |
|
private |
|
private |
uint32_t SdVolume::rootDirEntryCount | ( | void | ) | const |
uint32_t SdVolume::rootDirStart | ( | void | ) | const |
|
static |
return a pointer to the Sd2Card object for this volume
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |