mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-23 03:39:33 +00:00
sdmmc: support tuning input delay on esp32s3
This commit is contained in:
committed by
Armando (Dou Yiwen)
parent
e7fcfa43e9
commit
01a3d79b6f
@@ -206,6 +206,19 @@ esp_err_t sdmmc_init_host_frequency(sdmmc_card_t* card)
|
||||
}
|
||||
}
|
||||
|
||||
if (card->host.input_delay_phase != SDMMC_DELAY_PHASE_0) {
|
||||
if (card->host.set_input_delay) {
|
||||
err = (*card->host.set_input_delay)(card->host.slot, card->host.input_delay_phase);
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGE(TAG, "host.set_input_delay failed (0x%x)", err);
|
||||
return err;
|
||||
}
|
||||
} else {
|
||||
ESP_LOGE(TAG, "input phase delay feature isn't supported");
|
||||
return ESP_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
}
|
||||
|
||||
err = (*card->host.get_real_freq)(card->host.slot, &(card->real_freq_khz));
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGE(TAG, "failed to get real working frequency (0x%x)", err);
|
||||
|
||||
Reference in New Issue
Block a user