Jackson Lv / utility

Dependents:   SD

Embed: (wiki syntax)

« Back to documentation index

SdVolume Class Reference

Access FAT16 and FAT32 volumes on SD and SDHC cards. More...

#include <SdFat.h>

Public Member Functions

 SdVolume (void)
 Create an instance of SdVolume.
uint8_t init (Sd2Card *dev)
 Initialize a FAT volume.
uint8_t init (Sd2Card *dev, uint8_t part)
 Initialize a FAT volume.
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)
 Clear the cache and returns a pointer to the cache.
static Sd2CardsdCard (void)
 return a pointer to the Sd2Card object for this volume

Friends

class SdFile

Detailed Description

Access FAT16 and FAT32 volumes on SD and SDHC cards.

Definition at line 427 of file SdFat.h.


Constructor & Destructor Documentation

SdVolume ( void   )

Create an instance of SdVolume.

Definition at line 430 of file SdFat.h.


Member Function Documentation

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

Definition at line 455 of file SdFat.h.

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

Definition at line 457 of file SdFat.h.

static uint8_t* cacheClear ( void   ) [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.

Definition at line 434 of file SdFat.h.

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

Definition at line 459 of file SdFat.h.

uint8_t clusterSizeShift ( void   ) const
Returns:
The shift count required to multiply by blocksPerCluster.

Definition at line 461 of file SdFat.h.

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

Definition at line 463 of file SdFat.h.

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

Definition at line 465 of file SdFat.h.

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

Definition at line 467 of file SdFat.h.

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

Definition at line 469 of file SdFat.h.

uint8_t init ( Sd2Card dev )

Definition at line 481 of file SdFat.h.

uint8_t init ( Sd2Card dev )

Initialize a FAT volume.

Try partition one first then try super floppy format.

Parameters:
[in]devThe 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.

Definition at line 450 of file SdFat.h.

uint8_t init ( Sd2Card dev,
uint8_t  part 
)

Definition at line 484 of file SdFat.h.

uint8_t init ( Sd2Card 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.

Definition at line 227 of file SdVolume.cpp.

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

Definition at line 471 of file SdFat.h.

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

Definition at line 474 of file SdFat.h.

static Sd2Card* sdCard ( void   ) [static]

return a pointer to the Sd2Card object for this volume

Definition at line 476 of file SdFat.h.