Function SDC Command

From Uzebox Wiki
Jump to: navigation, search
Prototype

uint8_t SDC_Command(uint8_t cmd, uint32_t data);

Description

Sends SD command and waits for the first response byte (normally R1).

Parameters
  • cmd: The SD Command (for example 17 decimal for a sector read).
  • data: The command parameter (for example a sector address).
Returns

R1 response value.

Video Modes

All

Since

V.5.x.x bootloaders

Notes

Calculates CRC proper, and supports low SPI speeds. Pulls CS low before sending the command, and keeps it that way (low). You can complete the SD access using SDC_Release().