Skip to content

Commit 83f9f77

Browse files
committed
use slot 1 by default
1 parent ad519ad commit 83f9f77

File tree

1 file changed

+3
-3
lines changed
  • ports/espressif/common-hal/sdioio

1 file changed

+3
-3
lines changed

ports/espressif/common-hal/sdioio/SDCard.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ static int check_pins(const mcu_pin_obj_t *clock, const mcu_pin_obj_t *command,
3333
// ESP32-S3 and P4 can use any pin for any SDMMC func in either slot
3434
// Default to SLOT_1 for SD cards
3535
ESP_LOGI(TAG, "Using chip with CONFIG_SOC_SDMMC_USE_GPIO_MATRIX");
36-
if (!slot_in_use[0]) {
37-
return SDMMC_HOST_SLOT_0;
38-
} else if (!slot_in_use[1]) {
36+
if (!slot_in_use[1]) {
3937
return SDMMC_HOST_SLOT_1;
38+
} else if (!slot_in_use[0]) {
39+
return SDMMC_HOST_SLOT_0;
4040
}
4141
#else
4242
if (command->number == GPIO_NUM_11 && clock->number == GPIO_NUM_6 && data[0]->number == GPIO_NUM_7) {

0 commit comments

Comments
 (0)