From f690fd3a47d493e2c30829e06502ca7b3e787fff Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Sat, 11 Sep 2021 14:48:11 +1000 Subject: [PATCH] esp32/machine_timer: Use tx_update member for IDF 4.4 and above. --- ports/esp32/machine_timer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/esp32/machine_timer.c b/ports/esp32/machine_timer.c index 3b14581498..803849e1be 100644 --- a/ports/esp32/machine_timer.c +++ b/ports/esp32/machine_timer.c @@ -137,8 +137,12 @@ STATIC void machine_timer_isr(void *self_in) { #if CONFIG_IDF_TARGET_ESP32 device->hw_timer[self->index].update = 1; #else + #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 0) + device->hw_timer[self->index].update.tx_update = 1; + #else device->hw_timer[self->index].update.update = 1; #endif + #endif timer_ll_clear_intr_status(device, self->index); timer_ll_set_alarm_enable(device, self->index, self->repeat);