mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 12:10:59 +00:00
freertos: cleanup tick/idle hook functionality
If CONFIG_FREERTOS_LEGACY_HOOKS is kept enabled then defining idle/tick hooks will be applications responsibility as was the case earlier. Signed-off-by: Mahavir Jain <mahavir@espressif.com>
This commit is contained in:
@@ -455,7 +455,7 @@ void IRAM_ATTR esp_pm_impl_isr_hook()
|
||||
|
||||
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
|
||||
bool IRAM_ATTR vApplicationSleep( TickType_t xExpectedIdleTime )
|
||||
void IRAM_ATTR vApplicationSleep( TickType_t xExpectedIdleTime )
|
||||
{
|
||||
bool result = false;
|
||||
portENTER_CRITICAL(&s_switch_lock);
|
||||
@@ -499,7 +499,11 @@ bool IRAM_ATTR vApplicationSleep( TickType_t xExpectedIdleTime )
|
||||
}
|
||||
}
|
||||
portEXIT_CRITICAL(&s_switch_lock);
|
||||
return result;
|
||||
|
||||
/* Tick less idle was not successful, can block till next interrupt here */
|
||||
if (!result) {
|
||||
asm("waiti 0");
|
||||
}
|
||||
}
|
||||
#endif //CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
|
||||
|
Reference in New Issue
Block a user