From 1e1dd8b57534bd5582ec734bb609f7726a909d1f Mon Sep 17 00:00:00 2001 From: tmfarrington Date: Mon, 6 Feb 2023 12:36:16 -0500 Subject: [PATCH] setPins fix ESP32 "specified pins are not supported by this chip." (#7646) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ESP32: SDMMCFS::begin hardcodes the usage of slot 1, only check if the pins match slot 1 pins.] setPins() was testing pins D1, D2 and D3 all against D1 ... fine in 1 pin mode when all are -1 not so much if you're trying to get 4 pin mode working. I now see this function doesn't really do anything on the ESP32...accept now correctly checks that you are trying to use the slot 1 pins. Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> --- libraries/SD_MMC/src/SD_MMC.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/SD_MMC/src/SD_MMC.cpp b/libraries/SD_MMC/src/SD_MMC.cpp index 7365e0df0..83cf9aa0d 100644 --- a/libraries/SD_MMC/src/SD_MMC.cpp +++ b/libraries/SD_MMC/src/SD_MMC.cpp @@ -72,8 +72,8 @@ bool SDMMCFS::setPins(int clk, int cmd, int d0, int d1, int d2, int d3) (d0 == (int)SDMMC_SLOT1_IOMUX_PIN_NUM_D0) && (((d1 == -1) && (d2 == -1) && (d3 == -1)) || ((d1 == (int)SDMMC_SLOT1_IOMUX_PIN_NUM_D1) && - (d1 == (int)SDMMC_SLOT1_IOMUX_PIN_NUM_D2) && - (d1 == (int)SDMMC_SLOT1_IOMUX_PIN_NUM_D3))); + (d2 == (int)SDMMC_SLOT1_IOMUX_PIN_NUM_D2) && + (d3 == (int)SDMMC_SLOT1_IOMUX_PIN_NUM_D3))); if (!pins_ok) { log_e("SDMMCFS: specified pins are not supported by this chip."); return false; -- GitLab