Abstract interface for an SD card.
More...
#include <SdCardInterface.h>
Abstract interface for an SD card.
◆ cardCMD6()
virtual bool SdCardInterface::cardCMD6 |
( |
uint32_t |
arg, |
|
|
uint8_t * |
status |
|
) |
| |
|
pure virtual |
CMD6 Switch mode: Check Function Set Function.
- Parameters
-
[in] | arg | CMD6 argument. |
[out] | status | return status data. |
- Returns
- true for success or false for failure.
Implemented in SdioCard.
◆ end()
virtual void FsBlockDeviceInterface::end |
( |
| ) |
|
|
inlinevirtualinherited |
end use of device
Reimplemented in SdioCard.
◆ 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.
◆ hasDedicatedSpi()
virtual bool SdCardInterface::hasDedicatedSpi |
( |
| ) |
|
|
inlinevirtual |
◆ isBusy()
virtual bool FsBlockDeviceInterface::isBusy |
( |
| ) |
|
|
pure virtualinherited |
Check for FsBlockDevice busy.
- Returns
- true if busy else false.
Implemented in SdioCard.
◆ isDedicatedSpi()
virtual bool SdCardInterface::isDedicatedSpi |
( |
| ) |
|
|
inlinevirtual |
◆ 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.
◆ readSCR()
virtual bool SdCardInterface::readSCR |
( |
scr_t * |
scr | ) |
|
|
pure virtual |
Read SCR register.
- Parameters
-
[out] | scr | Value of SCR register. |
- Returns
- true for success or false for failure.
Implemented in SdioCard.
◆ readSDS()
virtual bool SdCardInterface::readSDS |
( |
sds_t * |
sds | ) |
|
|
pure virtual |
Return the 64 byte SD Status register.
- Parameters
-
[out] | sds | location for 64 status bytes. |
- Returns
- true for success or false for failure.
Implemented in SdioCard.
◆ readSector()
virtual bool FsBlockDeviceInterface::readSector |
( |
uint32_t |
sector, |
|
|
uint8_t * |
dst |
|
) |
| |
|
pure virtualinherited |
Read a sector.
- Parameters
-
[in] | sector | Logical sector to be read. |
[out] | dst | Pointer to the location that will receive the data. |
- Returns
- true for success or false for failure.
Implemented in SdioCard.
◆ readSectors()
virtual bool FsBlockDeviceInterface::readSectors |
( |
uint32_t |
sector, |
|
|
uint8_t * |
dst, |
|
|
size_t |
ns |
|
) |
| |
|
pure virtualinherited |
Read multiple sectors.
- Parameters
-
[in] | sector | Logical sector to be read. |
[in] | ns | Number of sectors to be read. |
[out] | dst | Pointer to the location that will receive the data. |
- Returns
- true for success or false for failure.
Implemented in SdioCard.
◆ sectorCount()
virtual uint32_t FsBlockDeviceInterface::sectorCount |
( |
| ) |
|
|
pure virtualinherited |
- Returns
- device size in sectors.
Implemented in SdioCard.
◆ setDedicatedSpi()
virtual bool SdCardInterface::setDedicatedSpi |
( |
bool |
value | ) |
|
|
inlinevirtual |
Set SPI sharing state
- Parameters
-
- Returns
- false by default.
◆ status()
virtual uint32_t SdCardInterface::status |
( |
| ) |
|
|
inlinevirtual |
- Returns
- card status.
Reimplemented in SdioCard.
◆ syncDevice()
virtual bool FsBlockDeviceInterface::syncDevice |
( |
| ) |
|
|
pure virtualinherited |
End multi-sector transfer and go to idle state.
- Returns
- true for success or false for failure.
Implemented 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.
◆ writeSector()
virtual bool FsBlockDeviceInterface::writeSector |
( |
uint32_t |
sector, |
|
|
const uint8_t * |
src |
|
) |
| |
|
pure virtualinherited |
Writes a sector.
- Parameters
-
[in] | sector | Logical sector to be written. |
[in] | src | Pointer to the location of the data to be written. |
- Returns
- true for success or false for failure.
Implemented in SdioCard.
◆ writeSectors()
virtual bool FsBlockDeviceInterface::writeSectors |
( |
uint32_t |
sector, |
|
|
const uint8_t * |
src, |
|
|
size_t |
ns |
|
) |
| |
|
pure virtualinherited |
Write multiple sectors.
- Parameters
-
[in] | sector | Logical sector to be written. |
[in] | ns | Number of sectors to be written. |
[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: