[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

@@ -18,6 +18,10 @@ typedef struct {
uint32_t dma_status; ///< masked DMA interrupt status
} sdmmc_event_t;
#define SDMMC_HOST_CLOCK_UPDATE_CMD_TIMEOUT_US 1000 * 1000
#define SDMMC_HOST_START_CMD_TIMEOUT_US 1000 * 1000
#define SDMMC_HOST_RESET_TIMEOUT_US 5000 * 1000
esp_err_t sdmmc_host_reset(void);
esp_err_t sdmmc_host_start_command(int slot, sdmmc_hw_cmd_t cmd, uint32_t arg);