📄 main.c
字号:
#include "maindef.h"
#include "lcd.h"
#include "uart.h"
#include "display.h"
#include "tc.h"
#include "irq.h"
#include "define.h"
#include "P103_MMI2DSP.H"
extern UI Screen_state;
extern struct System_Info_fm System_Info; //实时信息
extern unsigned int System_config_Old[CONFIG_NUM];
extern unsigned int System_config[CONFIG_NUM];
int main()
{
int j,i;
Screen_state=2;
delayfor(10000);
WrPortE32(PIO_PER, 0xe0000);//P17?????? //????·???
WrPortE32(PIO_OER, 0xe0000);//P17×÷????
WrPortE32(PIO_CODR,0xe0000);//P17????0
fnLCMInit();
cls();
Logo_View();
//led
System_Info.MMI_Statue=0x00;//液晶背光点亮
for(j=1,i=0;i<8;i++)
{
WrPortE08(LED, j);
delayfor(10000);
j=j<<1;
}
ComMMI2DSP_init();
InitCommBuf();
Interrupt_Init();
Interrupt_Enable(TC0IRQ);
TC0_Init();
TC0_RESET;
EnableIRQ();
//
//key
WrPortE32(PIO_PER, 0x01FF);//P0-P8口使能
WrPortE32(PIO_ODR, 0x01FF);//P0-P8作输入
MMI_DSP_Instruction(0x0500,0,0);/*读系统定值*/
delayfor(10000);
for(i=0;i<CONFIG_NUM;i++)
System_config_Old[i]=System_config[i];
while(1)
{
WATCHDOG_OUT1;
RUN_Process();
Show_Process();
WATCHDOG_OUT0;
CommRun();
Comm_103_Run();
/* delayfor(300);
Key = RdPortE32(PIO_PDSR);
//Updata_key(Key);
delayfor(300);
WrPortE08(LED, ~(RdPortE32(PIO_PDSR)%0x80));
*/
}
return 1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -