SdVolume Class Reference

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

#include <SdFat.h>

Collaboration diagram for SdVolume:
Collaboration graph
[legend]

List of all members.

Public Member Functions

  SdVolume (void)
uint8_t  init (Sd2Card &dev)
uint8_t  init (Sd2Card &dev, uint8_t vol)
uint8_t  blocksPerCluster (void)
uint32_t  blocksPerFat (void)
uint32_t  clusterCount (void)
uint8_t  clusterSizeShift (void)
uint32_t  dataStartBlock (void)
uint8_t  fatCount (void)
uint32_t  fatStartBlock (void)
uint8_t  fatType (void)
uint32_t  rootDirEntryCount (void)
uint32_t  rootDirStart (void)

Static Public Member Functions

static uint8_t *  cacheClear (void)
static Sd2Card sdCard (void)

Friends

class  SdFile

Detailed Description

Access FAT16 and FAT32 volumes on SD and SDHC cards.


Constructor & Destructor Documentation

SdVolume::SdVolume ( void   )  [inline]

Create an instance of SdVolume


Member Function Documentation

uint8_t SdVolume::blocksPerCluster ( void   )  [inline]
Returns:
The volume's cluster size in blocks.
uint32_t SdVolume::blocksPerFat ( void   )  [inline]
Returns:
The number of blocks in one FAT.
static uint8_t* SdVolume::cacheClear ( void   )  [inline, 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.

uint32_t SdVolume::clusterCount ( void   )  [inline]
Returns:
The total number of clusters in the volume.
uint8_t SdVolume::clusterSizeShift ( void   )  [inline]
Returns:
The shift count required to multiply by blocksPerCluster.
uint32_t SdVolume::dataStartBlock ( void   )  [inline]
Returns:
The logical block number for the start of file data.
uint8_t SdVolume::fatCount ( void   )  [inline]
Returns:
The number of FAT structures on the volume.
uint32_t SdVolume::fatStartBlock ( void   )  [inline]
Returns:
The logical block number for the start of the first FAT.
uint8_t SdVolume::fatType ( void   )  [inline]
Returns:
The FAT type of the volume. Values are 12, 16 or 32.
uint8_t 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.
uint8_t 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.
uint32_t SdVolume::rootDirEntryCount ( void   )  [inline]
Returns:
The number of entries in the root directory for FAT16 volumes.
uint32_t SdVolume::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.
static Sd2Card* SdVolume::sdCard ( void   )  [inline, static]

return a pointer to the Sd2Card object for this volume


Friends And Related Function Documentation

friend class SdFile [friend]

Allow SdFile access to SdVolume private data.


The documentation for this class was generated from the following files:
  • Arduino/libraries/SdFat/SdFat.h
  • Arduino/libraries/SdFat/SdFat.cpp

Generated on Wed Dec 23 08:22:21 2009 for SdFat by  doxygen 1.6.1