The idle hook will only get called if configUSE_IDLE_HOOK is set to 1 within FreeRTOSConfig.h. When this is set the application must provide the hook
function with the following prototype:
void vApplicationIdleHook( void );
The idle hook is called repeatedly as long as the idle task is running. It is paramount that the idle hook function does not call any API functions
that could cause it to block. Also, if the application makes use of the vTaskDelete() API function then the idle task hook must be allowed to periodically return
(this is because the idle task is responsible for cleaning up the resources that were allocated by the kernel to the task that has been deleted).
The tick hook will only get called if configUSE_TICK_HOOK is set to 1 within FreeRTOSConfig.h. When this is set the application must provide the hook
function with the following prototype:
void vApplicationTickHook( void );
vApplicationTickHook() executes from within an ISR so must be very short, not use much stack, and not call any API functions that don't end in
"FromISR" or "FROM_ISR".
See the demo application file crhook.c for an example of how to use a tick hook.
Defining the malloc() failure hook will help identify problems caused by lack of heap memory - especially when a call to pvPortMalloc() fails within an API function.
The malloc failed hook will only get called if configUSE_MALLOC_FAILED_HOOK is set to 1 within FreeRTOSConfig.h. When this is set the application
must provide the hook function with the following prototype:
void vApplicationMallocFailedHook( void );