-
-cmd_name = {
- # Normal commands (CMD)
- 0: 'GO_IDLE_STATE',
- 1: 'SEND_OP_COND',
- 6: 'SWITCH_FUNC',
- 8: 'SEND_IF_COND',
- 9: 'SEND_CSD',
- 10: 'SEND_CID',
- 12: 'STOP_TRANSMISSION',
- 13: 'SEND_STATUS',
- 16: 'SET_BLOCKLEN',
- 17: 'READ_SINGLE_BLOCK',
- 18: 'READ_MULTIPLE_BLOCK',
- 24: 'WRITE_BLOCK',
- 25: 'WRITE_MULTIPLE_BLOCK',
- 27: 'PROGRAM_CSD',
- 28: 'SET_WRITE_PROT',
- 29: 'CLR_WRITE_PROT',
- 30: 'SEND_WRITE_PROT',
- 32: 'ERASE_WR_BLK_START_ADDR',
- 33: 'ERASE_WR_BLK_END_ADDR',
- 38: 'ERASE',
- 42: 'LOCK_UNLOCK',
- 55: 'APP_CMD',
- 56: 'GEN_CMD',
- 58: 'READ_OCR',
- 59: 'CRC_ON_OFF',
- # CMD60-63: Reserved for manufacturer
-
- # Application-specific commands (ACMD)
- 13: 'SD_STATUS',
- 18: 'Reserved for SD security applications',
- 22: 'SEND_NUM_WR_BLOCKS',
- 23: 'SET_WR_BLK_ERASE_COUNT',
- 25: 'Reserved for SD security applications',
- 26: 'Reserved for SD security applications',
- 38: 'Reserved for SD security applications',
- 41: 'SD_SEND_OP_COND',
- 42: 'SET_CLR_CARD_DETECT',
- 43: 'Reserved for SD security applications',
- 44: 'Reserved for SD security applications',
- 45: 'Reserved for SD security applications',
- 46: 'Reserved for SD security applications',
- 47: 'Reserved for SD security applications',
- 48: 'Reserved for SD security applications',
- 49: 'Reserved for SD security applications',
- 51: 'SEND_SCR',
-}
-
-def ann_cmd_list():
- l = []
- for i in range(63 + 1):
- l.append(['cmd%d' % i, 'CMD%d' % i])
- return l