You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

44 lines
1017 B

#include "msp_Time2.h"
#include "msp_uart1.h"
///_TS_timer2 ts_timer2;
#if 10
void L0_timer2_init(void)////void Timer2Init(void) //3毫秒@22.1184MHz
{
AUXR &= 0xFB; //定时器时钟12T模式
T2L = 0x66; //设置定时初始值
T2H = 0xEA; //设置定时初始值
AUXR |= 0x10; //定时器2开始计时
}
#else
void L0_timer2_init10_22M(void)///void Timer2Init(void) //10毫秒@22.1184MHz
{
AUXR &= 0xFB; //定时器时钟12T模式
T2L = 0x00; //设置定时初始值
T2H = 0xB8; //设置定时初始值
AUXR |= 0x10; //定时器2开始计时
}
void L0_timer2_init(void)///void Timer2Init(void) //35毫秒@22.1184MHz
{
AUXR &= 0xFB; //定时器时钟12T模式
T2L = 0x00; //设置定时初始值
T2H = 0x04; //设置定时初始值
AUXR |= 0x10; //定时器2开始计时
}
void timer2_isrHanddle(void) D_SERVE_TIMER2
{
/// ts_timer2.callback(ts_timer2.p);
/// ts_timer2.callback(ts_timer2.p);
}
#endif
/******************************END*********************************/