driver/timer: only re-enable alarm in callback when auto reload is true

closes https://github.com/espressif/esp-idf/issues/7001
This commit is contained in:
laokaiyao
2021-05-12 14:00:58 +08:00
parent 08bd291459
commit 1138be502e
3 changed files with 8 additions and 8 deletions

View File

@@ -63,7 +63,7 @@ static void eventfd_timer_init(int timer_idx, double timer_interval_sec)
.counter_dir = TIMER_COUNT_UP,
.counter_en = TIMER_PAUSE,
.alarm_en = TIMER_ALARM_EN,
.auto_reload = false,
.auto_reload = true,
};
ESP_ERROR_CHECK(timer_init(TIMER_GROUP_0, timer_idx, &config));