SdFs
|
Abstract interface for an SD card. More...
#include <SdCardInterface.h>
Public Member Functions | |
virtual bool | erase (uint32_t firstSector, uint32_t lastSector)=0 |
virtual uint8_t | errorCode () const =0 |
virtual uint32_t | errorData () const =0 |
virtual bool | isBusy ()=0 |
virtual bool | readCID (cid_t *cid)=0 |
virtual bool | readCSD (csd_t *csd)=0 |
virtual bool | readOCR (uint32_t *ocr)=0 |
virtual bool | readSector (uint32_t sector, uint8_t *dst)=0 |
virtual bool | readSectors (uint32_t sector, uint8_t *dst, size_t ns)=0 |
virtual uint32_t | sectorCount ()=0 |
virtual uint32_t | status () |
virtual bool | syncDevice ()=0 |
virtual uint8_t | type () const =0 |
virtual bool | writeData (const uint8_t *src)=0 |
virtual bool | writeSector (uint32_t sector, const uint8_t *src)=0 |
virtual bool | writeSectors (uint32_t sector, const uint8_t *src, size_t ns)=0 |
virtual bool | writeStart (uint32_t sector)=0 |
virtual bool | writeStop ()=0 |
Abstract interface for an SD card.
Copyright (c) 20011-2017 Bill Greiman This file is part of the SdFs library for SD memory cards.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
pure virtual |
Erase a range of sectors.
[in] | firstSector | The address of the first sector in the range. |
[in] | lastSector | The address of the last sector in the range. |
Implemented in SdioCard.
|
pure virtual |
Implemented in SdioCard.
|
pure virtual |
Implemented in SdioCard.
|
pure virtual |
Implemented in SdioCard.
|
pure virtual |
|
pure virtual |
Read a card's CSD register.
[out] | csd | pointer to area for returned data. |
Implemented in SdioCard.
|
pure virtual |
Read OCR register.
[out] | ocr | Value of OCR register. |
Implemented in SdioCard.
|
pure virtualinherited |
Read a 512 byte sector.
[in] | sector | Logical sector to be read. |
[out] | dst | Pointer to the location that will receive the data. |
Implemented in SdioCard.
|
pure virtualinherited |
Read multiple 512 byte sectors.
[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. |
Implemented in SdioCard.
|
pure virtual |
Determine the size of an SD flash memory card.
Implements BlockDeviceInterface.
Implemented in SdioCard.
|
inlinevirtual |
Reimplemented in SdioCard.
|
pure virtualinherited |
End multi-sector transfer and go to idle state.
Implemented in SdioCard.
|
pure virtual |
Return the card type: SD V1, SD V2 or SDHC/SDXC
Implemented in SdioCard.
|
pure virtual |
Write one data sector in a multiple sector write sequence.
[in] | src | Pointer to the location of the data to be written. |
Implemented in SdioCard.
|
pure virtualinherited |
Writes a 512 byte sector.
[in] | sector | Logical sector to be written. |
[in] | src | Pointer to the location of the data to be written. |
Implemented in SdioCard.
|
pure virtualinherited |
Write multiple 512 byte sectors.
[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. |
Implemented in SdioCard.
|
pure virtual |
Start a write multiple sectors sequence.
[in] | sector | Address of first sector in sequence. |
Implemented in SdioCard.
|
pure virtual |