Fix typo in ESP700 thanks @levak for pointing this out

Fix API change in SDIO for 1bit set pin and 4 pins set pins
This commit is contained in:
Luc 2024-02-11 08:58:42 +08:00
parent 126a0ee1b3
commit 97508d9617
2 changed files with 7 additions and 1 deletions

View File

@ -61,7 +61,7 @@ void ESP3DCommands::ESP700(int cmd_params_pos, ESP3DMessage* msg) {
if (esp3d_gcode_host.getStatus() == HOST_NO_STREAM) {
if (esp3d_gcode_host.processFile(tmpstr.c_str(),
msg->authentication_level)) {
esp3d_log("Processing %s", parameter.c_str());
esp3d_log("Processing %s", tmpstr.c_str());
} else {
hasError = true;
error_msg = "Error processing file";

View File

@ -100,12 +100,18 @@ uint8_t ESP_SD::getState(bool refresh) {
}
bool ESP_SD::begin() {
#if SDIO_BIT_MODE == SD_ONE_BIT_MODE
#if (ESP_SDIO_CLK_PIN != -1) || (ESP_SDIO_CMD_PIN != -1) || (ESP_SDIO_D0_PIN != -1)
SD_MMC.setPins(ESP_SDIO_CLK_PIN, ESP_SDIO_CMD_PIN, ESP_SDIO_D0_PIN);
#endif //(ESP_SDIO_CLK_PIN != -1)
#else
#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)
#endif // SD_ONE_BIT_MODE
esp3d_log("Begin SDIO");
_started = true;
#ifdef SDMMC_FORCE_BEGIN