From 87a2f35c2c1a8d36d000e25f49335f0e0edd98af Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Thu, 23 Jun 2022 22:12:36 -0300 Subject: [PATCH] esp32: Remove hard-coded SPI port for MMC/SD SPI --- boards/xtensa/esp32/esp32-devkitc/src/esp32_mmcsd.c | 2 +- boards/xtensa/esp32/esp32-wrover-kit/src/esp32_mmcsd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);