From 46c2fabffd90941ad859c2c629ebe95acc9400ed Mon Sep 17 00:00:00 2001 From: mikee47 Date: Tue, 9 Jan 2024 17:07:48 +0000 Subject: [PATCH] Fix build error for IDF 5.0 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. --- 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 }