Merge branch 'bugfix/esp_timer_disable_alarms' into 'master'

esp_timer: Fix the stop alarm triggering when the timer list is empty

Closes IDF-5323

See merge request espressif/esp-idf!21114
This commit is contained in:
Konstantin Kondrashov 2022-11-22 16:14:27 +08:00
commit 167d5ae3b9

View File

@ -80,9 +80,7 @@ void IRAM_ATTR esp_timer_impl_set_alarm_id(uint64_t timestamp, unsigned alarm_id
portENTER_CRITICAL_SAFE(&s_time_update_lock);
timestamp_id[alarm_id] = timestamp;
timestamp = MIN(timestamp_id[0], timestamp_id[1]);
if (timestamp != UINT64_MAX) {
systimer_hal_set_alarm_target(&systimer_hal, SYSTIMER_LL_ALARM_CLOCK, timestamp);
}
portEXIT_CRITICAL_SAFE(&s_time_update_lock);
}