题目内容
#include "stm32f10x_heads.h"#include "HelloRobot.h"int Cnt=0;//用于中断子程序中的计数Timx_Init(){(1)//复位TIM3定时器(2)//间隔0.5sTIM_TimeBaseStructure.TIM_ClockDivision = 0x0;TIM_TimeBaseStructure.TIM_CounterMode = (3);(4)/* Clear TIM3 update pending flag[清除TIM3溢出中断标志] */(5)/* Enable TIM3 Update interrupt [TIM3溢出中断允许]*/(6)/* TIM2 enable counter [允许tim3计数]*/(7)}int main(void){BSP_Init();GPIO_SetBits(GPIOB,GPIO_Pin_0);GPIO_SetBits(GPIOB,GPIO_Pin_1);GPIO_SetBits(GPIOB,GPIO_Pin_5);(8)//定时器初始化函数while (1);}
查看答案
搜索结果不匹配?点我反馈