From 49c9aa54e1bc3032acba8c1ce1c7f5528261ea9a Mon Sep 17 00:00:00 2001 From: Mike Date: Wed, 10 Jan 2024 08:55:28 +0000 Subject: [PATCH] Fix build error for IDF 5.0 (#2703) Re. #2701 call to `timer_ll_trigger_soft_capture` only required for IDF 5.2, as while function signature changed in IDF 5.0 it retains previous behaviour. Co-authored-by: mikee47 --- Sming/Arch/Esp32/Components/driver/hw_timer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sming/Arch/Esp32/Components/driver/hw_timer.cpp b/Sming/Arch/Esp32/Components/driver/hw_timer.cpp index 5106e59c55..84254b7cc0 100644 --- a/Sming/Arch/Esp32/Components/driver/hw_timer.cpp +++ b/Sming/Arch/Esp32/Components/driver/hw_timer.cpp @@ -143,7 +143,9 @@ class TimerConfig timer_ll_get_counter_value(dev, index, &val); return val; #else +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0) timer_ll_trigger_soft_capture(dev, index); +#endif return timer_ll_get_counter_value(dev, index); #endif }