|
|
|
@ -208,6 +208,46 @@ typedef volatile struct MMC_registers {
|
|
|
|
|
#define MMC_CMD_CMD_INDEX_MASK bits(5,0)
|
|
|
|
|
#define MMC_CMD_CMD_INDEX(x) bits_val(5,0,x)
|
|
|
|
|
|
|
|
|
|
/* MMC commands (for MMC_CMD) - see Table 15-19 in [1], Table 15-19 in [2] */
|
|
|
|
|
|
|
|
|
|
#define MMC_CMD_GO_IDLE_STATE MMC_CMD_CMD_INDEX(0)
|
|
|
|
|
#define MMC_CMD_SEND_OP_COND MMC_CMD_CMD_INDEX(1)
|
|
|
|
|
#define MMC_CMD_ALL_SEND_CID MMC_CMD_CMD_INDEX(2)
|
|
|
|
|
#define MMC_CMD_SET_RELATIVE_ADDR MMC_CMD_CMD_INDEX(3)
|
|
|
|
|
#define MMC_CMD_SET_DSR MMC_CMD_CMD_INDEX(4)
|
|
|
|
|
#define MMC_CMD_SELECT_DESELECT_CARD MMC_CMD_CMD_INDEX(7)
|
|
|
|
|
#define MMC_CMD_SEND_CSD MMC_CMD_CMD_INDEX(9)
|
|
|
|
|
#define MMC_CMD_SEND_CID MMC_CMD_CMD_INDEX(10)
|
|
|
|
|
#define MMC_CMD_READ_DAT_UNTIL_STOP MMC_CMD_CMD_INDEX(11)
|
|
|
|
|
#define MMC_CMD_STOP_TRANSMISSION MMC_CMD_CMD_INDEX(12)
|
|
|
|
|
#define MMC_CMD_SEND_STATUS MMC_CMD_CMD_INDEX(13)
|
|
|
|
|
#define MMC_CMD_GO_INACTIVE_STATE MMC_CMD_CMD_INDEX(15)
|
|
|
|
|
#define MMC_CMD_SET_BLOCKLEN MMC_CMD_CMD_INDEX(16)
|
|
|
|
|
#define MMC_CMD_READ_SINGLE_BLOCK MMC_CMD_CMD_INDEX(17)
|
|
|
|
|
#define MMC_CMD_READ_MULTIPLE_BLOCK MMC_CMD_CMD_INDEX(18)
|
|
|
|
|
#define MMC_CMD_WRITE_DAT_UNTIL_STOP MMC_CMD_CMD_INDEX(20)
|
|
|
|
|
#define MMC_CMD_WRITE_BLOCK MMC_CMD_CMD_INDEX(24)
|
|
|
|
|
#define MMC_CMD_WRITE_MULTIPLE_BLOCK MMC_CMD_CMD_INDEX(25)
|
|
|
|
|
#define MMC_CMD_PROGRAM_CID MMC_CMD_CMD_INDEX(26)
|
|
|
|
|
#define MMC_CMD_PROGRAM_CSD MMC_CMD_CMD_INDEX(27)
|
|
|
|
|
#define MMC_CMD_SET_WRITE_PROT MMC_CMD_CMD_INDEX(28)
|
|
|
|
|
#define MMC_CMD_CLR_WRITE_PROT MMC_CMD_CMD_INDEX(29)
|
|
|
|
|
#define MMC_CMD_SEND_WRITE_PROT MMC_CMD_CMD_INDEX(30)
|
|
|
|
|
#define MMC_CMD_TAG_SECTOR_START MMC_CMD_CMD_INDEX(32)
|
|
|
|
|
#define MMC_CMD_TAG_SECTOR_END MMC_CMD_CMD_INDEX(33)
|
|
|
|
|
#define MMC_CMD_UNTAG_SECTOR MMC_CMD_CMD_INDEX(34)
|
|
|
|
|
#define MMC_CMD_TAG_ERASE_GROUP_START MMC_CMD_CMD_INDEX(35)
|
|
|
|
|
#define MMC_CMD_TAG_ERASE_GROUP_END MMC_CMD_CMD_INDEX(36)
|
|
|
|
|
#define MMC_CMD_UNTAG_ERASE_GROUP MMC_CMD_CMD_INDEX(37)
|
|
|
|
|
#define MMC_CMD_ERASE MMC_CMD_CMD_INDEX(38)
|
|
|
|
|
#define MMC_CMD_FAST_IO MMC_CMD_CMD_INDEX(39)
|
|
|
|
|
#define MMC_CMD_GO_IRQ_STATE MMC_CMD_CMD_INDEX(40)
|
|
|
|
|
#define MMC_CMD_LOCK_UNLOCK MMC_CMD_CMD_INDEX(42)
|
|
|
|
|
#define MMC_CMD_APP_CMD MMC_CMD_CMD_INDEX(55)
|
|
|
|
|
#define MMC_CMD_GEN_CMD MMC_CMD_CMD_INDEX(56)
|
|
|
|
|
#define MMC_CMD_READ_OCR MMC_CMD_CMD_INDEX(58)
|
|
|
|
|
#define MMC_CMD_CRC_ON_OFF MMC_CMD_CMD_INDEX(59)
|
|
|
|
|
|
|
|
|
|
/* MMC_ARGH bits - see Table 15-20 in [1], Table 15-20 in [2] */
|
|
|
|
|
|
|
|
|
|
#define MMC_ARGH_ARG_H_MASK bits(15,0)
|
|
|
|
|