diff --git a/boards/xtensa/esp32/esp32-devkitc/src/esp32_mmcsd.c b/boards/xtensa/esp32/esp32-devkitc/src/esp32_mmcsd.c index 0f42d14e44..0bbe718ab5 100644 --- a/boards/xtensa/esp32/esp32-devkitc/src/esp32_mmcsd.c +++ b/boards/xtensa/esp32/esp32-devkitc/src/esp32_mmcsd.c @@ -64,7 +64,7 @@ int esp32_mmcsd_initialize(int minor) mcinfo("INFO: Initializing mmcsd card\n"); - spi = esp32_spibus_initialize(2); + spi = esp32_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); if (spi == NULL) { mcerr("ERROR: Failed to initialize SPI port %d\n", 2); diff --git a/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_mmcsd.c b/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_mmcsd.c index 0857ce2eb3..893f0d96e3 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_mmcsd.c +++ b/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_mmcsd.c @@ -64,7 +64,7 @@ int esp32_mmcsd_initialize(int minor) mcinfo("INFO: Initializing mmcsd card\n"); - spi = esp32_spibus_initialize(2); + spi = esp32_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); if (spi == NULL) { mcerr("ERROR: Failed to initialize SPI port %d\n", 2);