|
Prusa MINI Firmware overview
|
Raw access to SD and SDHC flash memory cards. More...
#include <Sd2Card.h>
Public Member Functions | |
| Sd2Card () | |
| uint32_t | cardSize () |
| bool | erase (uint32_t firstBlock, uint32_t lastBlock) |
| bool | eraseSingleBlockEnable () |
| void | error (const uint8_t code) |
| int | errorCode () const |
| int | errorData () const |
| bool | init (const uint8_t sckRateID, const pin_t chipSelectPin) |
| bool | readBlock (uint32_t block, uint8_t *dst) |
| bool | readCID (cid_t *cid) |
| bool | readCSD (csd_t *csd) |
| bool | readData (uint8_t *dst) |
| bool | readStart (uint32_t blockNumber) |
| bool | readStop () |
| bool | setSckRate (const uint8_t sckRateID) |
| int | type () const |
| bool | writeBlock (uint32_t blockNumber, const uint8_t *src) |
| bool | writeData (const uint8_t *src) |
| bool | writeStart (uint32_t blockNumber, const uint32_t eraseCount) |
| bool | writeStop () |
| bool | init (const uint8_t sckRateID=0, const pin_t chipSelectPin=SD_CHIP_SELECT_PIN) |
| bool | readStart (const uint32_t block) |
| bool | readData (uint8_t *dst) |
| bool | readStop () const |
| bool | writeStart (const uint32_t block, const uint32_t) |
| bool | writeData (uint8_t *src) |
| bool | writeStop () const |
| bool | readBlock (uint32_t block, uint8_t *dst) |
| bool | writeBlock (uint32_t blockNumber, const uint8_t *src) |
| uint32_t | cardSize () |
Static Public Member Functions | |
| static bool | usbStartup () |
| static void | idle () |
| static bool | isInserted () |
| static bool | ready () |
Raw access to SD and SDHC flash memory cards.
define SOFTWARE_SPI to use bit-bang SPI
| Sd2Card::Sd2Card | ( | ) |
| uint32_t Sd2Card::cardSize | ( | ) |
| bool Sd2Card::erase | ( | uint32_t | firstBlock, |
| uint32_t | lastBlock | ||
| ) |
| bool Sd2Card::eraseSingleBlockEnable | ( | ) |
| int Sd2Card::errorCode | ( | ) | const |
Initialize an SD flash memory card with default clock rate and chip select pin. See sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin).
| bool Sd2Card::readBlock | ( | uint32_t | block, |
| uint8_t * | dst | ||
| ) |

| bool Sd2Card::readCID | ( | cid_t * | cid | ) |
| bool Sd2Card::readCSD | ( | csd_t * | csd | ) |
Read a card's CSD register. The CSD contains Card-Specific Data that provides information regarding access to the card's contents.
| [out] | csd | pointer to area for returned data. |
| bool Sd2Card::readData | ( | uint8_t * | dst | ) |
| bool Sd2Card::readStart | ( | uint32_t | blockNumber | ) |
| bool Sd2Card::readStop | ( | ) |
| int Sd2Card::type | ( | ) | const |

| bool Sd2Card::writeStart | ( | uint32_t | blockNumber, |
| const uint32_t | eraseCount | ||
| ) |
| bool Sd2Card::writeStop | ( | ) |
|
static |
| bool Sd2Card::init | ( | const uint8_t | sckRateID = 0, |
| const pin_t | chipSelectPin = SD_CHIP_SELECT_PIN |
||
| ) |
|
static |
| bool Sd2Card::readStart | ( | const uint32_t | block | ) |
| bool Sd2Card::readData | ( | uint8_t * | dst | ) |
| bool Sd2Card::writeData | ( | uint8_t * | src | ) |
| bool Sd2Card::readBlock | ( | uint32_t | block, |
| uint8_t * | dst | ||
| ) |
| uint32_t Sd2Card::cardSize | ( | ) |
|
static |
|
static |
