⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 typedef.h.bak

📁 电能表源码
💻 BAK
字号:
/********************************************************


********************************************************/
#ifndef _TYPEDEF_H_
#define _TYPEDEF_H_
#define CPU_BIT	 16

#if CPU_BIT	== 16
//-------------------------------
typedef unsigned char 	uint8;
//------------------------------
typedef signed char  	int8;
//------------------------------
typedef	unsigned int 	uint16;
//------------------------------
typedef	signed int 		int16;
//------------------------------
typedef	unsigned long 	uint32;
//------------------------------
typedef	signed long		int32;
//------------------------------
typedef	uint16			bool;
//------------------------------
//typedef signed long long 	int64;

//typedef unsigned long long uint64;

//------------------------------
typedef union
{
	uint16 word;
	uint8  byte[2];
}Word16;

typedef union
{
	uint32 lword;
	uint16 word[2];
	uint8  byte[4];	
}Word32;

typedef union
{
	Word32 word;
	uint8  byte;
}Word40;

struct gbit_def {
        char    b0:1;
        char    b1:1;
		char    b2:1;
		char    b3:1;
		char    b4:1;
		char    b5:1;
		char    b6:1;
		char    b7:1;
};

union gbyte_def {
     struct gbit_def bite;
	 char   byte;
};

struct RTCTime
{
	unsigned char rYear;		// 年
	unsigned char rMonth;		// 月
	unsigned char rDate;		// 日
	unsigned char rHour;		// 时
	unsigned char rMinute;	// 分
	unsigned char rSecond;	// 秒
	unsigned char rWeek;		// 周	
};

struct ETMode
{
	unsigned char tName;		// 定时器号
	unsigned char tMode;		// 定时器工作模式
	unsigned char tDH;			// 定时器高位
	unsigned char tDL;			// 定时器低位
	unsigned char tClk;			// 时钟clk分频系数
};
	
static struct RTCTime xdata RTCTIME;
static unsigned long SysIntFlgState;

#ifndef true
#define true 1
#endif

#ifndef false
#define false 0
#endif



#endif







#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -