📄 init.c
字号:
#include".\XQG.h"
#include".\Disp.h"
#include".\key.h"
unsigned char gvc_key_scan_js;
unsigned int gvi_com_counter=0;
bit gvb_time_ok_flg;
extern bit gvb_speed_time_flg;
void T1_INT() interrupt 3 using 1 //定时
{
}
/******************************************************************************************
*函数名: EX0_IN
*参数: NULL
*返回值: NULL
*描述: 外部中断0
*版本信息: V1.0 2005年12月28日
******************************************************************************************/
void INT0_ind_current(void) interrupt 0 /*过流*/
{
}
/******************************************************************************************
*函数名: T2_INT
*参数: NULL
*返回值: NULL
*描述: 定时器中断2
*版本信息: V1.0 2005年12月28日
******************************************************************************************/
void T2_INT() interrupt 5 using 3
{
TF2=CLEAR; /*2MS 时基*/
Disp();
gvc_key_scan_js++;
if(gvc_key_scan_js>=5)
{
gvc_key_scan_js=0;
Key_Check();
gvc_com_now=P2&0x70;
gvc_com_now>>=4;
gvb_key_scan_flg=1;
}
if(gvb_speed_time_flg)
{
gvi_com_counter++;
if(gvi_com_counter>=750)
{
gvi_com_counter=0;
gvb_speed_time_flg=0;
gvb_time_ok_flg=1;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -