发布网友 发布时间:2022-04-23 08:49
共1个回答
热心网友 时间:2022-06-18 14:31
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;
}
}
这样去处理。