Information Technology Reference
In-Depth Information
Sending a Command
For each supported MultiMediaCard command, device firmware needs to
know the command index, the response type, the CRC value to send in the
command, and whether the command's six bytes are followed by more data.
The code below stores this information about commands using an enumera-
tion, a series of defines, and a table in ROM.
Storing Command Information
The sdmmc_cmd enumeration assigns a value to each command:
typedef enum
{
GO_IDLE_STATE,
SEND_OP_COND,
SEND_CSD,
SEND_CID,
STOP_TRANSMISSION,
SEND_STATUS,
SET_BLOCKLEN,
READ_SINGLE_BLOCK,
READ_MULTI_BLOCK,
WRITE_SINGLE_BLOCK,
WRITE_MULTI_BLOCK,
TAG_SECTOR_START,
TAG_SECTOR_END,
UNTAG_SECTOR,
TAG_ERASE_GRP_START,
TAG_ERASE_GRP_END,
UNTAG_ERASE_GRP,
ERASE,
LOCK_UNLOCK,
SD_APP_OP_COND,
APP_CMD,
READ_OCR,
CRC_ON_OFF
}sdmmc_cmd;
Search WWH ::




Custom Search