esp_timer: Add an option to skip unhandled events for periodic timers

- Added an option to skip unhandled events for periodic timers. Useful for light sleep.
- Added doc about this case
- Added Test a latency between a call of callback and real event (14-16us). and UT to check skip_unhandled_events.
- Fixed for esp_timer_dump() if name of timer is NULL
- Refactored timer_process_alarm()
- Added the delete function after using in UTs
This commit is contained in:
KonstantinKondrashov
2020-11-13 16:46:21 +08:00
parent 66416d1a8b
commit aa96c9a4d8
9 changed files with 221 additions and 67 deletions

View File

@@ -73,7 +73,8 @@ ESPEventRegTimed::ESPEventRegTimed(std::function<void(const ESPEvent &, void*)>
timer_cb_hook,
static_cast<void*>(this),
ESP_TIMER_TASK,
"event"
"event",
false // skip_unhandled_events
};
esp_err_t res = esp_timer_create(&oneshot_timer_args, &timer);