Abstract interface for an SD card.
More...
#include <SdCardInterface.h>
Inherits BlockDeviceInterface.
Inherited by SdioCard.
Abstract interface for an SD card.
◆ erase()
| virtual bool SdCardInterface::erase |
( |
uint32_t |
firstSector, |
|
|
uint32_t |
lastSector |
|
) |
| |
|
pure virtual |
Erase a range of sectors.
- Parameters
-
| [in] | firstSector | The address of the first sector in the range. |
| [in] | lastSector | The address of the last sector in the range. |
- Returns
- true for success or false for failure.
Implemented in SdioCard.
◆ errorCode()
| virtual uint8_t SdCardInterface::errorCode |
( |
| ) |
const |
|
pure virtual |
- Returns
- error code.
Implemented in SdioCard.
◆ errorData()
| virtual uint32_t SdCardInterface::errorData |
( |
| ) |
const |
|
pure virtual |
- Returns
- error data.
Implemented in SdioCard.
◆ isBusy()
| virtual bool SdCardInterface::isBusy |
( |
| ) |
|
|
pure virtual |
◆ readCID()
| virtual bool SdCardInterface::readCID |
( |
cid_t * |
cid | ) |
|
|
pure virtual |
Read a card's CID register.
- Parameters
-
| [out] | cid | pointer to area for returned data. |
- Returns
- true for success or false for failure.
Implemented in SdioCard.
◆ readCSD()
| virtual bool SdCardInterface::readCSD |
( |
csd_t * |
csd | ) |
|
|
pure virtual |
Read a card's CSD register.
- Parameters
-
| [out] | csd | pointer to area for returned data. |
- Returns
- true for success or false for failure.
Implemented in SdioCard.
◆ readOCR()
| virtual bool SdCardInterface::readOCR |
( |
uint32_t * |
ocr | ) |
|
|
pure virtual |
Read OCR register.
- Parameters
-
| [out] | ocr | Value of OCR register. |
- Returns
- true for success or false for failure.
Implemented in SdioCard.
◆ sectorCount()
| virtual uint32_t SdCardInterface::sectorCount |
( |
| ) |
|
|
pure virtual |
Determine the size of an SD flash memory card.
- Returns
- The number of 512 byte data sectors in the card or zero if an error occurs.
Implements BlockDeviceInterface.
Implemented in SdioCard.
◆ status()
| virtual uint32_t SdCardInterface::status |
( |
| ) |
|
|
inlinevirtual |
- Returns
- card status.
Reimplemented in SdioCard.
◆ type()
| virtual uint8_t SdCardInterface::type |
( |
| ) |
const |
|
pure virtual |
Return the card type: SD V1, SD V2 or SDHC/SDXC
- Returns
- 0 - SD V1, 1 - SD V2, or 3 - SDHC/SDXC.
Implemented in SdioCard.
◆ writeData()
| virtual bool SdCardInterface::writeData |
( |
const uint8_t * |
src | ) |
|
|
pure virtual |
Write one data sector in a multiple sector write sequence.
- Parameters
-
| [in] | src | Pointer to the location of the data to be written. |
- Returns
- true for success or false for failure.
Implemented in SdioCard.
◆ writeStart()
| virtual bool SdCardInterface::writeStart |
( |
uint32_t |
sector | ) |
|
|
pure virtual |
Start a write multiple sectors sequence.
- Parameters
-
| [in] | sector | Address of first sector in sequence. |
- Returns
- true for success or false for failure.
Implemented in SdioCard.
◆ writeStop()
| virtual bool SdCardInterface::writeStop |
( |
| ) |
|
|
pure virtual |
End a write multiple sectors sequence.
- Returns
- true for success or false for failure.
Implemented in SdioCard.
The documentation for this class was generated from the following file: