[SDMMC] add reasonable timeouts to all while loops

Closes: https://github.com/espressif/esp-idf/pull/10532
This commit is contained in:
Chip Weinberger
2023-01-18 15:22:07 -08:00
committed by Adam Múdry
parent 6ff1059da7
commit c7ca30e62f
9 changed files with 41 additions and 14 deletions

View File

@@ -30,6 +30,9 @@
#define SDMMC_GO_IDLE_DELAY_MS 20
#define SDMMC_IO_SEND_OP_COND_DELAY_MS 10
#define SDMMC_INIT_WAIT_DATA_READY_TIMEOUT_US 5000 * 1000
#define SDMMC_READY_FOR_DATA_TIMEOUT_US 5000 * 1000
/* These delay values are mostly useful for cases when CD pin is not used, and
* the card is removed. In this case, SDMMC peripheral may not always return
* CMD_DONE / DATA_DONE interrupts after signaling the error. These timeouts work