Reputation: 11
Implicit declaration of function 'HAL_GetTick'. Can you tell me or give me a link for library, where I can find declaration of this function.
Upvotes: 0
Views: 4980
Reputation: 533
The function is nearly the same at every device I am currently working on an F4 so I will provide the definition I have :
/**
* @brief Provides a tick value in millisecond.
* @note This function is declared as __weak to be overwritten in case of other
* implementations in user file.
* @retval tick value
*/
__weak uint32_t HAL_GetTick(void)
{
return uwTick;
}
The obvious question is what the hell is uwTick? it is just a volatile uint_32 that get incremented whenever the HAL_IncTick
is called. The Hal_IncTick is called from the SysTickHandler
that is called as an interrupt.
Upvotes: 1