SdCard Class Reference

Hardware access class for SD flash cards. More...

#include <SdCard.h>

Inheritance diagram for SdCard:

Inheritance graph
[legend]
Collaboration diagram for SdCard:

Collaboration graph
[legend]

List of all members.

Public Member Functions

uint32_t cardSize (void)
uint8_t init (void)
uint8_t readBlock (uint32_t block, uint8_t *dst)
uint8_t writeBlock (uint32_t block, uint8_t *src)


Detailed Description

Hardware access class for SD flash cards.

Supports raw access to a standard SD flash memory card.


Member Function Documentation

uint32_t SdCard::cardSize ( void   ) 

Determine the size of a standard SD flash memory card

Returns:
The number of 512 byte data blocks in the card

uint8_t SdCard::init ( void   ) 

Initialize a SD flash memory card.

Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.

uint8_t SdCard::readBlock ( uint32_t  blockNumber,
uint8_t *  dst 
) [virtual]

Reads a 512 byte block from a storage device.

Parameters:
[in] blockNumber Logical block to be read.
[out] dst Pointer to the location that will receive the data.
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.

Reimplemented from BlockDevice.

uint8_t SdCard::writeBlock ( uint32_t  blockNumber,
uint8_t *  src 
) [virtual]

Writes a 512 byte block to a storage device.

Parameters:
[in] blockNumber Logical block to be written.
[in] src Pointer to the location of the data to be written.
Returns:
The value one, true, is returned for success and the value zero, false, is returned for failure.

Reimplemented from BlockDevice.


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

Generated on Thu Oct 9 08:22:19 2008 for Fat16 by  doxygen 1.5.6