datatype.h

来自「s1d13716的源码 windiws ce 或8位单片机」· C头文件 代码 · 共 94 行

H
94
字号
//============================================================================
//
//  DATATYPE.H
//
//  Copyright (c) 2002 Epson Research and Development, Inc. 
//  All rights reserved.
//
//	The tabs in the file is formatted at 4.
//
//============================================================================

#ifndef DATATYPE_H
#define DATATYPE_H




//============================================================================
//
//	COMMON DATA TYPES
//
//	As much as possible, programs should use natural data types (eg. int) to
//	allow compiler optimizations to kick in.  When specific data widths are
//	required, then the following types should be used.  Note that on some
//	platforms, like PalmOS, an int is ONLY 16-BITS, therefore, int must be
//	used carefully, and that all int expresions will not be promoted to longs.
//
//	Please do not declare HAL-specific datatypes here, put them in hal.h!
//
//============================================================================


#if defined(OLD_PLATFORM) || defined(ANOTHER_OLD_PLATFORM)
#define VOLATILE
#else
#define VOLATILE volatile
#endif

typedef unsigned char		UInt8;
typedef unsigned short		UInt16;
typedef unsigned long		UInt32;

typedef signed char			Int8;
typedef signed short		Int16;
typedef signed long			Int32;

typedef Int8*				pInt8;
typedef Int16*				pInt16;
typedef Int32*				pInt32;

typedef UInt8*				pUInt8;
typedef UInt16*				pUInt16;
typedef UInt32*				pUInt32;

typedef VOLATILE UInt8*		pvUInt8;
typedef VOLATILE UInt16*	pvUInt16;
typedef VOLATILE UInt32*	pvUInt32;

#ifndef NULL
#ifdef __cplusplus
#define NULL		0
#else
#define NULL		((void*)0)
#endif
#endif

// If you are using C++, then use: bool and true/false.
// If you are using C, then use: Boolean and TRUE/FALSE.
// If you are using C#, then you are one lucky programmer!
typedef int		Boolean;
#ifndef TRUE
#define TRUE	1
#endif
#ifndef FALSE
#define FALSE	0
#endif

// The following parameter prefixes exist to help suggest direction of the parameter.
// This is consistent with the C# language that uses the "out" prefix in the same manner.
// For example:   Foo( inout const char* Buf, out BufSize, in bool Transform );
#ifndef in
#define in
#endif
#ifndef out
#define out
#endif
#ifndef inout
#define inout
#endif


#endif // DATATYPE_H

⌨️ 快捷键说明

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