2014-11-05 03:14 AM
How can I check what timer triggered the callback:
void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim)
{
}
I investigated the htim structure, but did not find anything that can be used to do this..
There should be some ID or a function for checking if htim == htim1 etc.
2014-11-05 04:32 AM
I figured out a way to do it:
switch( (uint32_t) htim->Instance)
{
case TIM1_BASE:
//Code here.
break;
}