项目中头文件合并技巧global.h

#ifdef __GLOBAL__
    #define __EXT__
#else
    #define __EXT__  extern 
#endif

#include"..\USER_PROGRAM\USER_PROGRAM.CEX"
#include"..\BS84C12A_LIBV413\BS84C12A_LIBV413.CEX" 
#include"..\TKS_GLOBE_VARIES.H"     

#define u8 unsigned char
#define u16 unsigned int

#define CHECK_STATUS     0   
#define RUN_STATUS         1
#define SET_TIME_STUTAS 2
#define SET_TEM_STUTAS     3
#define ALARM_STUTAS     4
#define SLEEP_STUTAS     5
#define WAIT_STUTAS     6

#define ENABLE         1
#define DISENABLE     0

#define _BEGIN(ms)    static unsigned long num = 0; if(GetCount() - num >= ms)do{ num = GetCount()
#define _END()    }while(0)

__EXT__ void Adc_Init(void);
__EXT__ void IO_Init(void);
__EXT__ void Task_key(void);
__EXT__ void Task_Display(void);
__EXT__ void Time0_Init(void);
__EXT__ void EEPROM_ByteWrite(u8 ADDR,u8 byte);
__EXT__ u8 EEPROM_ByteRead(volatile u8 Addr);
__EXT__ unsigned long GetCount(void);
__EXT__ void Task_StatusManage(void);
__EXT__ u16 GetAdcValue(u8 ch);

__EXT__ unsigned char device_status;
__EXT__ unsigned char set_time;
__EXT__ unsigned char BlankFlag;
__EXT__ unsigned char set_temperature;
 

上一篇:inode与block概述及模拟inode号耗尽、ext和xfs类型文件恢复


下一篇:uniGUI学习之脱离Delphi直接写ExtJS从入门到精通03自定义函数_调用顺序(47)