平车主控板(运维板)
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.
 
 
 
 
 

31 lines
800 B

#include "Time.h"
//#include "../bsp/bsp_led.h"
/*************************初始化定时器0*****************************/
void L0_timer0_Init(void) //50毫秒@11.0592MHz
{
AUXR &= 0x7F; //定时器时钟12T模式
TMOD &= 0xF0; //设置定时器模式
TL0 = 0x00; //设置定时初值
TH0 = 0x4C; //设置定时初值
TF0 = 0; //清除TF0标志
TR0 = 1; //定时器0开始计时
ET0 = 1; //add by cc
}
/********************** Timer0中断函数************************/
void timer0 (void) interrupt 1
{
NOP(); NOP(); NOP();
TF0 = 0;
L1_tick_tick(); ///系统中的1sflag 和以10ms为颗粒的延时使用 为tdelay服务
/// BITN_1(DR_who_wakeup, DRB_who_wakeup_timer0);
NOP(); NOP(); NOP();
}
/******************************END*********************************/