From a7e97d873f376db95fd390ff11a9169f803c0549 Mon Sep 17 00:00:00 2001 From: Luc <8822552+luc-github@users.noreply.github.com> Date: Tue, 22 Sep 2020 15:47:01 +0200 Subject: [PATCH] Fix recursive deadloop on esp32 with pinMode thanks Aneantisor Add SDIO one bit mode setting in configuration.h thanks Aneantisor Fix typo in comments --- esp3d/src/core/hal.cpp | 2 +- esp3d/src/include/pins.h | 2 +- esp3d/src/include/version.h | 2 +- esp3d/src/modules/filesystem/sd/sdio_esp32.cpp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/esp3d/src/core/hal.cpp b/esp3d/src/core/hal.cpp index 2884811e..c2e606ff 100644 --- a/esp3d/src/core/hal.cpp +++ b/esp3d/src/core/hal.cpp @@ -65,7 +65,7 @@ void Hal::pinMode(uint8_t pin, uint8_t mode) return; } #endif - pinMode(pin, mode); + ::pinMode(pin, mode); } void Hal::toneESP(uint8_t pin, unsigned int frequency, unsigned int duration, bool sync) diff --git a/esp3d/src/include/pins.h b/esp3d/src/include/pins.h index ac269a48..3076e276 100644 --- a/esp3d/src/include/pins.h +++ b/esp3d/src/include/pins.h @@ -60,7 +60,7 @@ #define VSYNC_GPIO_NUM 25 #define HREF_GPIO_NUM 23 #define PCLK_GPIO_NUM 22 -#endif //CAMERA_MODEL_AI_THINKER +#endif //CAMERA_MODEL_CUSTOM #if CAMERA_DEVICE == CAMERA_MODEL_WROVER_KIT #define CAM_LED_PIN -1 diff --git a/esp3d/src/include/version.h b/esp3d/src/include/version.h index 27c05eeb..d16f088f 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.a56" +#define FW_VERSION "3.0.0.a57" #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 56d48a6e..1fecd741 100644 --- a/esp3d/src/modules/filesystem/sd/sdio_esp32.cpp +++ b/esp3d/src/modules/filesystem/sd/sdio_esp32.cpp @@ -57,7 +57,7 @@ uint8_t ESP_SD::getState(bool refresh) if (!lastinitok) { log_esp3d("last init was failed try sd_mmc begin"); //SD_MMC.end(); - if (SD_MMC.begin()) { + if (SD_MMC.begin("/sdcard", SD_ONE_BIT_MODE)) { log_esp3d("sd_mmc begin succeed"); if (SD_MMC.cardType() != CARD_NONE ) { _state = ESP_SDCARD_IDLE; @@ -78,7 +78,7 @@ uint8_t ESP_SD::getState(bool refresh) lastinitok = false; log_esp3d("Soft sd check failed"); //SD_MMC.end(); - if (SD_MMC.begin()) { + if (SD_MMC.begin("/sdcard", SD_ONE_BIT_MODE)) { log_esp3d("new sd_mmc begin succeed"); if ( SD_MMC.cardType() != CARD_NONE ) { _state = ESP_SDCARD_IDLE;