Skip to content

Commit 9ee4566

Browse files
gneworldxiaoxiang781216
authored andcommitted
mmcsd:add reset card to idle state (CMD0) support
Signed-off-by: wanggang26 <[email protected]>
1 parent 863dcbb commit 9ee4566

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/mmcsd/mmcsd_sdio.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3365,6 +3365,12 @@ static int mmcsd_iocmd(FAR struct mmcsd_state_s *priv,
33653365
opcode = ic_ptr->opcode & MMCSD_CMDIDX_MASK;
33663366
switch (opcode)
33673367
{
3368+
case MMCSD_CMDIDX0: /* Reset card to idle state */
3369+
{
3370+
mmcsd_sendcmdpoll(priv, MMCSD_CMD0, ic_ptr->arg);
3371+
MMCSD_USLEEP(MMCSD_IDLE_DELAY);
3372+
}
3373+
break;
33683374
case MMCSD_CMDIDX2: /* Get cid reg data */
33693375
{
33703376
memcpy((FAR void *)(uintptr_t)ic_ptr->data_ptr,

0 commit comments

Comments
 (0)