ambiguating new declaration of 'bool esp_vApplicationIdleHook()'
Posted: Thu Dec 08, 2022 4:41 am
Hi
I am trying to define a sleep function with esp_vApplicationIdleHook() but whenever I put it in my sketch there is an error:
Compilation error: ambiguating new declaration of 'bool esp_vApplicationIdleHook()'.
My code is simple like:
How esp_vApplicationIdleHook(void) is used actually?
Thanks for any reply in advance.
John
I am trying to define a sleep function with esp_vApplicationIdleHook() but whenever I put it in my sketch there is an error:
Compilation error: ambiguating new declaration of 'bool esp_vApplicationIdleHook()'.
My code is simple like:
Code: Select all
bool esp_vApplicationIdleHook(void)
{
static TickType_t lastFlashTime=0;
if((xTaskGetTickCount()-lastFlashTime) > 1000)
{
Serial.println(F("It is 1 sec elapse in the idle hook."));
lastFlashTime = xTaskGetTickCount();
}
return true;
}
Thanks for any reply in advance.
John