📄 main.c
字号:
#include "Stdafx.h"
#include "Serial.h"
#include "Infrared.h"
uchar key;
void main()
{
int i = 0;
//Init
// TMOD = 0x1; //定时器T0模式1
// TL0 = 0x0f;//定时初值
// TH0 = 0x00;
// TR0 = 1; //开始运行
// ET0 = 1; //允许定时器T0中断
//P2_5 = 0;
InitCom(5);
// T2CON=0x04;
EA = 1;
P0 = 0x0F;
//P1 = 0;
while(1)
{
key = GetKey();
if(key)
{
Send(key);
}
P1_0 = 1;
/*P2_5 = P3_2;
if(P3_2)
P1 = 0xFF;
else P1 = 0x00;*/
while(SerialCheck())
{
Send(Getbyte());
}
//Send('A');
//P2_5 = 0;
//delay(60000);
//P2_5 = 1;
//delay(60000);
//delay(600);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -