From bad7a28bfda2f12014a0bcf9e607324697b5c6d4 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 24 Feb 2022 08:08:48 +0000 Subject: [PATCH] esp32: heltec: change delay Newer esp-idf has lost ets-delay-us --- .../embedded/esp32/esp-heltec-wb32/main/devices.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/minimal-examples/embedded/esp32/esp-heltec-wb32/main/devices.c b/minimal-examples/embedded/esp32/esp-heltec-wb32/main/devices.c index a4dab2a04..da7cbe9c6 100644 --- a/minimal-examples/embedded/esp32/esp-heltec-wb32/main/devices.c +++ b/minimal-examples/embedded/esp32/esp-heltec-wb32/main/devices.c @@ -31,7 +31,10 @@ lws_netdev_instance_wifi_t *wnd; static void esp32_i2c_delay(void) { - ets_delay_us(1); + volatile int n = 0; + + while (n < 20) + n++; } static const lws_bb_i2c_t li2c = {