mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
fix(sdmmc): SDMMC concurrency change active slot only after the slot is initialized
Fixes counting of initialized slots
This commit is contained in:
parent
a4a597c8c8
commit
30196f9430
@ -413,8 +413,8 @@ esp_err_t sdmmc_host_start_command(int slot, sdmmc_hw_cmd_t cmd, uint32_t arg)
|
|||||||
// Change the host settings to the appropriate slot before starting the transaction
|
// Change the host settings to the appropriate slot before starting the transaction
|
||||||
// If the slot is not initialized (slot_host_div not set) or already active, do nothing
|
// If the slot is not initialized (slot_host_div not set) or already active, do nothing
|
||||||
if (s_host_ctx.active_slot_num != slot) {
|
if (s_host_ctx.active_slot_num != slot) {
|
||||||
s_host_ctx.active_slot_num = slot;
|
|
||||||
if (sdmmc_host_slot_initialized(slot)) {
|
if (sdmmc_host_slot_initialized(slot)) {
|
||||||
|
s_host_ctx.active_slot_num = slot;
|
||||||
sdmmc_host_change_to_slot(slot);
|
sdmmc_host_change_to_slot(slot);
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGD(TAG, "Slot %d is not initialized yet, skipping sdmmc_host_change_to_slot", slot);
|
ESP_LOGD(TAG, "Slot %d is not initialized yet, skipping sdmmc_host_change_to_slot", slot);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user