esp_timer: use freertos critical section compliant APIs

Some modules use esp_timer from interrupt context and hence
with vanilla FreeRTOS it should use correct critical section
API
This commit is contained in:
Mahavir Jain
2019-11-14 11:39:11 +05:30
parent 59d818c387
commit d0a37704a3
4 changed files with 44 additions and 6 deletions

View File

@@ -264,12 +264,12 @@ static IRAM_ATTR bool timer_armed(esp_timer_handle_t timer)
static IRAM_ATTR void timer_list_lock(void)
{
portENTER_CRITICAL(&s_timer_lock);
portENTER_CRITICAL_SAFE(&s_timer_lock);
}
static IRAM_ATTR void timer_list_unlock(void)
{
portEXIT_CRITICAL(&s_timer_lock);
portEXIT_CRITICAL_SAFE(&s_timer_lock);
}
static void timer_process_alarm(esp_timer_dispatch_t dispatch_method)