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

📄 datatype.h

📁 配合高频信号发生器和遥控器
💻 H
字号:
/***************************************************通用数据类型定义***************************************************/#ifndef _DATATYPE_H_#define _DATATYPE_H_#include <pic.h>	#ifndef uchar		typedef unsigned char byte;		#define	uchar	byte	#endif	#ifndef schar		typedef signed char sbyte;		#define	schar	sbyte	#endif    #ifndef word		typedef unsigned int uint;		#define	word	uint    #endif    #ifndef ulong		typedef unsigned long int 	ulong;    #endif#define TRUE    1#define FALSE   0#define ON      1#define OFF     0#define BIT_TEST( x, y) (( (x) & (1<<(y))) != 0)typedef union {              uchar byte;              struct {     //位0~位7                   unsigned b0:1, b1:1, b2:1, b3:1, b4:1, b5:1, b6:1, b7:1;              }bits;}ByteTyp;//单字typedef union {	uint w;	struct{ uchar bl; //低字节			uchar bh; //高字节		  }lhbyte;}WORD;//双字typedef union {	ulong dw;	struct{ uint dwl; //低字			uint dwh; //高字		  }lhword;}DWORD;//四字typedef union {	    struct{ DWORD fbl; //低2字			DWORD fbh; //高2字		  }lhdword;	}FWORD;#endif

⌨️ 快捷键说明

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