📄 main.c
字号:
#include <includes.h>
//#include <ctype.h>
//#include <aultdef.h>
//#include <i2c.h>
//#include <hhh16.h>
//#include <chatfont.h>
//#include <sed1330.h>
//#include <8253.h>
#define KCREETRANT reentrant
sfr AUXR =0X8E;
void sys_init(void *lcnpdata) reentrant;
void mysecondtask(void *lcndata) reentrant;
void main1test(void *lcnpdata) KCREETRANT;
void gettesttype(void *lcnpdata) KCREETRANT;
void lcngetkey(void *lcnpdata) reentrant;
void getcurvault() reentrant;
void getstr8255() reentrant;
OS_STK sys_init_Stk[MaxStkSize];
OS_STK mysecondtask_Stk[MaxStkSize];
OS_STK lcngetkey_Stk[MaxStkSize];
OS_STK main1test_Stk[MaxStkSize];
OS_STK gettesttype_Stk[MaxStkSize];
void init_serial() reentrant
{
PCON &= 0x7F;
TH1 = 0xFD;
TMOD |= 0X20; //定时器1方式2
SCON = 0X50; //允许接收
TR1 = 1; //启动定时器1
ES = 1; //串行口中断允许
}
//串口中断处理
void serial() reentrant
{
if(RI)
{
RI = 0;
}
else
{
}
}
unsigned int advaut; //AD574采样中间数值
void getad() reentrant
{
}
unsigned char gettimestr(unsigned int x,unsigned char y,unsigned char nu,unsigned char bdate) reentrant
{
return(1);
}
unsigned char getstrnumber(unsigned int x,unsigned char y,unsigned char nu) reentrant
{
return(1);
}
void showlogo() reentrant
{
}
//系统初始化
void sys_init(void *lcnpdata) reentrant
{
}
void gettesttype(void *lcnpdata) KCREETRANT
{
}
void lcngetkey(void *lcnpdata) reentrant
{
}
//秒定时中断
void mysecondtask(void *lcndata) reentrant
{
lcndata=lcndata;
while(1)
{
// bSecond=1;
getconut();
OSTimeDly(OS_TICKS_PER_SEC);
}
}
void showmain1() reentrant
{
}
void showvaultall() reentrant
{
}
void getcurvault() reentrant
{
}
char *p;
void led() reentrant
{
while(1)
{
p=0x400;
*p=100;
if(*p==100)
{
P1=0xaa;
}
else
{
P1=0xf0;
}
}
}
char a[10];
void main (void)
{
AUXR=0X00;
//led();
OSInit();
InitTimer2();
P1= OSTaskCreate(led, 0,a,1) ;
if(P1=42)
{
P3=0x00;
}
OSStart();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -