diff --git a/esp3d/src/include/pins.h b/esp3d/src/include/pins.h index 03b5af03..c54aa1ea 100644 --- a/esp3d/src/include/pins.h +++ b/esp3d/src/include/pins.h @@ -386,6 +386,31 @@ //Pins for the support of SD Card Reader //-1 means use default pins of your board defined core //this are overwrited if defined in configuration.h or myconfig.h + +#ifndef ESP_SDIO_CLK_PIN +#define ESP_SDIO_CLK_PIN -1 +#endif // ESP_SDIO_CLK_PIN + +#ifndef ESP_SDIO_CMD_PIN +#define ESP_SDIO_CMD_PIN -1 +#endif // ESP_SDIO_CMD_PIN + +#ifndef ESP_SDIO_D0_PIN +#define ESP_SDIO_D0_PIN -1 +#endif //ESP_SDIO_D0_PIN + +#ifndef ESP_SDIO_D1_PIN +#define ESP_SDIO_D1_PIN -1 +#endif //ESP_SDIO_D1_PIN + +#ifndef ESP_SDIO_D2_PIN +#define ESP_SDIO_D2_PIN -1 +#endif //ESP_SDIO_D2_PIN + +#ifndef ESP_SDIO_D3_PIN +#define ESP_SDIO_D3_PIN -1 +#endif //ESP_SDIO_D3_PIN + #ifndef ESP_SD_CS_PIN #define ESP_SD_CS_PIN -1 #endif //ESP_SD_CS_PIN diff --git a/esp3d/src/include/version.h b/esp3d/src/include/version.h index c0c492a5..80ee5f76 100644 --- a/esp3d/src/include/version.h +++ b/esp3d/src/include/version.h @@ -22,7 +22,7 @@ #define _VERSION_ESP3D_H //version and sources location -#define FW_VERSION "3.0.0.a213" +#define FW_VERSION "3.0.0.a214" #define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0" #endif //_VERSION_ESP3D_H diff --git a/esp3d/src/modules/filesystem/sd/sdio_esp32.cpp b/esp3d/src/modules/filesystem/sd/sdio_esp32.cpp index 7a37b63b..7bcbe68e 100644 --- a/esp3d/src/modules/filesystem/sd/sdio_esp32.cpp +++ b/esp3d/src/modules/filesystem/sd/sdio_esp32.cpp @@ -101,6 +101,9 @@ uint8_t ESP_SD::getState(bool refresh) bool ESP_SD::begin() { +#if (ESP_SDIO_CLK_PIN != -1) || (ESP_SDIO_CMD_PIN != -1) || (ESP_SDIO_D0_PIN != -1) || (ESP_SDIO_D1_PIN != -1) || (ESP_SDIO_D2_PIN != -1) || (ESP_SDIO_D3_PIN != -1) + SD_MMC.setPins(ESP_SDIO_CLK_PIN, ESP_SDIO_CMD_PIN, ESP_SDIO_D0_PIN, ESP_SDIO_D1_PIN, ESP_SDIO_D2_PIN, ESP_SDIO_D3_PIN) +#endif //(ESP_SDIO_CLK_PIN != -1) log_esp3d("Begin SDIO"); _started = true; #ifdef SDMMC_FORCE_BEGIN