From 893c6624384d68f7c6da7a383380fa13ccfc1ad0 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun, 27 Feb 2022 09:34:44 +1300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20ESP32=20=5Fdelay=5Fms,=20fix=20u?= =?UTF-8?q?8g=5Fesp32=5Fspi.cpp=20(#23810)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/ESP32/HAL.cpp | 2 ++ Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/Marlin/src/HAL/ESP32/HAL.cpp b/Marlin/src/HAL/ESP32/HAL.cpp index adf5cecabe..4000dcc908 100644 --- a/Marlin/src/HAL/ESP32/HAL.cpp +++ b/Marlin/src/HAL/ESP32/HAL.cpp @@ -167,6 +167,8 @@ uint8_t MarlinHAL::get_reset_source() { return rtc_get_reset_reason(1); } void MarlinHAL::reboot() { ESP.restart(); } +void _delay_ms(int delay_ms) { delay(delay_ms); } + // return free memory between end of heap (or end bss) and whatever is current int MarlinHAL::freeMemory() { return ESP.getFreeHeap(); } diff --git a/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp b/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp index e454130d43..0aa66ed2cf 100644 --- a/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp +++ b/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp @@ -30,6 +30,7 @@ #include #include "Arduino.h" #include "../shared/HAL_SPI.h" +#include "HAL.h" #include "SPI.h" static SPISettings spiConfig;