kendryte-freertos-sdk icon indicating copy to clipboard operation
kendryte-freertos-sdk copied to clipboard

vApplicationIdleHook() cannot be overridden.

Open derekmulcahy opened this issue 4 years ago • 0 comments

  • [x ] BUG REPORT

The vApplicationIdleHook() is defined in freertos/lib/osentry.c as

void vApplicationIdleHook(void)
{
}

better code would be

#if ( configUSE_IDLE_HOOK == 1 )
void __attribute__((weak)) vApplicationIdleHook(void)
{
}
#endif /* configUSE_IDLE_HOOK */

as this would allow the application to implement the hook and it would not define the hook unless it is needed. I have tested this and it works well.

derekmulcahy avatar Jan 16 '20 16:01 derekmulcahy