新手入门
- 积分
- 19
- 金钱
- 19
- 注册时间
- 2018-3-26
- 在线时间
- 2 小时
|
[mw_shl_code=c,true]#include "stm32f10x.h"
#include "pwm.h"
#include "delay.h"
#include "veer.h"
#include "NVIC.h"
#include "input.h"
u16 f;
int main(void)
{
f=2500;//避免重复进入按键中断的标志位
delay_init();//延时函数初始化
EXTI_TIM1();//外部中断的初始化
TIM_CtrlPWMOutputs(TIM1,ENABLE);//TIM1主输出使能
TIM_ARRPreloadConfig(TIM1, ENABLE);//使能TIM1 在ARR上的预装载寄存器
TIM_Cmd(TIM1, ENABLE);//使能 TIM1 外设
while(1);[/mw_shl_code]
|
|