Adafruit WaveHC Arduino Library
Public Member Functions | Friends | List of all members
FatVolume Class Reference

FatVolume provides access to FAT volumes. More...

#include <FatReader.h>

Public Member Functions

 FatVolume (void)
 
uint8_t init (SdReader &dev)
 
uint8_t init (SdReader &dev, uint8_t part)
 
uint8_t blocksPerCluster (void)
 
uint32_t blocksPerFat (void)
 
uint32_t clusterCount (void)
 
uint32_t dataStartBlock (void)
 
uint8_t fatCount (void)
 
uint32_t fatStartBlock (void)
 
uint8_t fatType (void)
 
SdReaderrawDevice (void)
 Raw device for this volume. More...
 
uint32_t rootDirEntryCount (void)
 
uint32_t rootDirStart (void)
 
uint32_t totalBlocks (void)
 

Friends

class FatReader
 

Detailed Description

FatVolume provides access to FAT volumes.

Constructor & Destructor Documentation

◆ FatVolume()

FatVolume::FatVolume ( void  )
inline

Create an instance of FatVolume

Member Function Documentation

◆ init() [1/2]

uint8_t FatVolume::init ( SdReader dev)
inline

Initialize a FAT volume. Try partition one first then try super floppy format.

Parameters
[in]devThe SdReader 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() [2/2]

uint8_t FatVolume::init ( SdReader dev,
uint8_t  part 
)

Initialize a FAT volume.

Parameters
[in]devThe SD card where the volume is located.
[in]partThe 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.

◆ blocksPerCluster()

uint8_t FatVolume::blocksPerCluster ( void  )
inline
Returns
The volume's cluster size in blocks.

◆ blocksPerFat()

uint32_t FatVolume::blocksPerFat ( void  )
inline
Returns
The number of blocks in one FAT.

◆ clusterCount()

uint32_t FatVolume::clusterCount ( void  )
inline
Returns
The total number of clusters in the volume.

◆ dataStartBlock()

uint32_t FatVolume::dataStartBlock ( void  )
inline
Returns
The logical block number for the start of file data.

◆ fatCount()

uint8_t FatVolume::fatCount ( void  )
inline
Returns
The number of FAT structures on the volume.

◆ fatStartBlock()

uint32_t FatVolume::fatStartBlock ( void  )
inline
Returns
The logical block number for the start of the first FAT.

◆ fatType()

uint8_t FatVolume::fatType ( void  )
inline
Returns
The FAT type of the volume. Values are 12, 16 or 32.

◆ rawDevice()

SdReader* FatVolume::rawDevice ( void  )
inline

Raw device for this volume.

Returns
the raw device

◆ rootDirEntryCount()

uint32_t FatVolume::rootDirEntryCount ( void  )
inline
Returns
The number of entries in the root directory for FAT16 volumes.

◆ rootDirStart()

uint32_t FatVolume::rootDirStart ( void  )
inline
Returns
The logical block number for the start of the root directory on FAT16 volumes or the first cluster number on FAT32 volumes.

◆ totalBlocks()

uint32_t FatVolume::totalBlocks ( void  )
inline
Returns
The total number of blocks in the volume.

Friends And Related Function Documentation

◆ FatReader

friend class FatReader
friend

Allow FatReader access to FatVolume private data.


The documentation for this class was generated from the following files: