|
算是自娱自乐吧,继续写下去!; T: V9 }4 [ w" H- c5 { 说明一点,STM32CUBEMX只是个自动生成代码的工具,如果没有掌握STM32的基本工作原理,用STM32CUBEMX反倒有点绕!, H9 \$ V/ r+ M$ s: s2 e . D6 q: a, U3 @
nucleo_tutorial3.pdf
(250.34 KB, 下载次数: 4319)
|
微信公众号
手机版
{
/* Prevent unused argument(s) compilation warning */8 f) U1 T3 K- P
UNUSED(htim); O b: l$ _0 c6 k: P7 m; W
/* NOTE : This function Should not be modified, when the callback is needed, M. ^, P& i% O$ ]1 a
the __HAL_TIM_PeriodElapsedCallback could be implemented in the user file
*/
}
/* USER CODE BEGIN 4 */0 w* h6 A5 B# S( Y4 E) M
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{9 g7 l: k7 j3 Z" @* `7 f% A
HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5);* p0 R! O; M" e/ G' }7 A
}
/* USER CODE END 4 */
=========================================& s) R4 r; O/ J7 a. u8 {6 w5 k
I2 ^' ?& q$ I/ X; I
如果同时开两个或更多定时中断,这个回调函数怎么识别TIM1 TIM2 TIM3呢?