STM8STIM1TIM2初始化函数
STM8STIM1TIM2初始化函数/*TIM2初始化函数返回值:⽆参数:定时时间 us*/#define CPU_CLK 16027 //主频 KHzvoid timer2_Init(ulong us){uchar PSCR = 0; //分频uint pow;ulong ARR;start:pow=1;for(uchar i=0;i<PSCR;i++) //算2的n次⽅{po...
2023-10-20 46 0
STM8STIM1TIM2初始化函数/*TIM2初始化函数返回值:⽆参数:定时时间 us*/#define CPU_CLK 16027 //主频 KHzvoid timer2_Init(ulong us){uchar PSCR = 0; //分频uint pow;ulong ARR;start:pow=1;for(uchar i=0;i<PSCR;i++) //算2的n次⽅{po...