]> granicus.if.org Git - esp-idf/commit
sdmmc: introduce is_app_cmd flag, check it along with opcode
authorIvan Grokhotkov <ivan@espressif.com>
Wed, 12 Jul 2017 13:04:54 +0000 (21:04 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Wed, 16 Aug 2017 10:59:04 +0000 (18:59 +0800)
commitf908425b134363bc2f549075bd3a8b49f0f28e27
treece92af92f33bf2eaf8d0fe687235d75e41684cf1
parente6258ac6cbf0a0453a3701cc1438c6b5d40a61d3
sdmmc: introduce is_app_cmd flag, check it along with opcode

‘make_hw_cmd’ function checks opcodes in a few cases. Comparing opcode
does not tell the whole story, because for some SD commands there is are
APP commands with the same opcodes. This change introduces a flag which
indicates whether the next command is going to be an APP command.
The check for APP_SET_BUS_WIDTH command is updated to use this flag.
This fixes a bug with an unexpected STOP_TRANSMISSION command sent after
SWITCH_FUNC command, which has opcode 6, same as APP_SET_BUS_WIDTH.
components/driver/sdmmc_transaction.c