Skip to content

SdCard

Hardware access class for SD flash cards

詳細情報

メンバー

errorCode

Code for a SD error. See for definitions.

uint8_t SdCard::errorCode

errorData

Data that may be helpful in determining the cause of an error

uint8_t SdCard::errorData

cardSize()

Determine the size of a standard SD flash memory card

uint32_t SdCard::cardSize(void)

戻り値

uint32_t The number of 512 byte data blocks in the card

init()

Initialize an SD flash memory card with default clock rate and chip select pin. See .

uint8_t SdCard::init(void)

戻り値

uint8_t

init()

Initialize an SD flash memory card with the selected SPI clock rate and the default SD chip select pin. See .

uint8_t SdCard::init(uint8_t speed)

引数

  • uint8_t speed

戻り値

uint8_t

init()

Initialize a SD flash memory card.

uint8_t SdCard::init(uint8_t speed, uint8_t chipselectPin)

引数

  • uint8_t speed Set SPI Frequency to F_CPU/2 if speed = 0 or F_CPU/4 if speed = 1.
  • uint8_t chipselectPin

戻り値

uint8_t

readBlock()

Reads a 512 byte block from a storage device.

uint8_t SdCard::readBlock(uint32_t block, uint8_t *dst)

引数

  • uint32_t block
  • uint8_t * dst Pointer to the location that will receive the data.

戻り値

uint8_t

readCID()

Read the register which contains info about the card. This includes Manufacturer ID, OEM ID, product name, version, serial number, and manufacturing date.

uint8_t SdCard::readCID(cid_t *cid)

引数

  • cid_t* cid

戻り値

uint8_t

writeBlock()

Writes a 512 byte block to a storage device.

uint8_t SdCard::writeBlock(uint32_t block, const uint8_t *src)

引数

  • uint32_t block
  • constuint8_t * src Pointer to the location of the data to be written.

戻り値

uint8_t