common.h

来自「AVR写的433M无线通信原代码.」· C头文件 代码 · 共 105 行

H
105
字号
/*******************************************************************************************************
 *                                                                                                     *
 *        **********                                                                                   *
 *       ************                                                                                  *
 *      ***        ***                                                                                 *
 *      ***   +++   ***                                                                                *
 *      ***   + +   ***     This file contains commonly used types and is included in                  *
 *      ***   +             halsrf04.h, hal2430.h, and halxx10.h                                       *
 *      ***   + +   ***                                                                                *
 *      ***   +++   ***     common.h                                                                   *
 *      ***        ***                                                                                 *
 *       ************                                                                                  *
 *        **********                                                                                   *
 *                                                                                                     *
 *******************************************************************************************************
 * Compiler:            Keil C51 V7.50                                                                 *
 * Target platform:                                                                                    *
 * Author:              SNA                                                                            *
 *******************************************************************************************************
 * Revision history:    See end of file                                                                *
 ******************************************************************************************************/
#ifndef COMMON_H
#define COMMON_H





/*******************************************************************************************************
 *******************************************************************************************************
 **************************                   Commonly used types           ****************************
 *******************************************************************************************************
 *******************************************************************************************************/




//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
// Common data types
typedef unsigned char		BOOL;

typedef unsigned char		BYTE;
typedef unsigned short		WORD;
typedef unsigned long		DWORD;
typedef unsigned long long	QWORD;

typedef unsigned char		UINT8;
typedef unsigned short		UINT16;
typedef unsigned long		UINT32;
typedef unsigned long long	UINT64;

typedef signed char			INT8;
typedef signed short		INT16;
typedef signed long			INT32;
typedef signed long long	INT64;

// Common values
#ifndef FALSE
	#define FALSE 0
#endif
#ifndef TRUE
	#define TRUE 1
#endif
#ifndef NULL
	#define NULL 0
#endif
//-------------------------------------------------------------------------------------------------------


typedef union
{
	unsigned long val;
	struct
	{
		unsigned int uiLWORD;
		unsigned int uiHWORD;
	};
	
	struct
	{
		unsigned char ucByte[4];
	};
	
}_DEF_ADDR_;


/*******************************************************************************************************
 * Revision history:                                                                                   *
 *
 * $Log: common.h,v $
 * Revision 1.3  2005/11/09 10:03:45  sna
 * Added define for MSB
 *
 * Revision 1.2  2005/02/07 14:34:42  sna
 * Initial version in CVS.
 *
 *
 ******************************************************************************************************/




#endif// COMMON_H

⌨️ 快捷键说明

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