From e57b3e8b054821284c26b397410eea8ec0024cb7 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Thu, 9 Jan 2025 18:55:57 +0100 Subject: [PATCH] prepare for IDF 5.4 based Arduino (#22793) --- lib/libesp32/ESP32-to-ESP8266-compat/src/esp8266toEsp32.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libesp32/ESP32-to-ESP8266-compat/src/esp8266toEsp32.cpp b/lib/libesp32/ESP32-to-ESP8266-compat/src/esp8266toEsp32.cpp index 21bdc542e..40a55cf83 100644 --- a/lib/libesp32/ESP32-to-ESP8266-compat/src/esp8266toEsp32.cpp +++ b/lib/libesp32/ESP32-to-ESP8266-compat/src/esp8266toEsp32.cpp @@ -315,6 +315,9 @@ int32_t analogAttach(uint32_t pin, bool output_invert) { // returns ledc chan (ledc_timer_t)timer, // timer_sel 0, // duty 0, // hpoint +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0) + (ledc_sleep_mode_t) 2, +#endif { output_invert ? 1u : 0u },// output_invert }; ledc_channel_config(&ledc_channel);