发布网友
共1个回答
热心网友
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
/* NOTE : This function Should not be modified, when the callback is needed,
the __HAL_TIM_PeriodElapsedCallback could be implemented in the user file
*/
uint16_t i;
switch ((uint32_t)(htim->Instance))
{
case (uint32_t)TIM2:
HAL_GPIO_TogglePin (GPIOF,GPIO_PIN_7);
break;
case (uint32_t)TIM4:
HAL_GPIO_TogglePin (GPIOF,GPIO_PIN_8);
break;
}
}
这样去处理。