datatypes.h

来自「source code for a sample alarm control p」· C头文件 代码 · 共 54 行

H
54
字号
//=============================================================================
// File: DATATYPES.H - V1.00
// Rem.: The ACPRD Project Page on the Web -> http://hc12web.de/acprd
//=============================================================================

#ifndef __DATATYPES_H
#define __DATATYPES_H

//-- Select Compiler! ---------------------------------------------------------
//#define 	METROWERKS_C				// Metrowerks CodeWarrior
#define 	IMAGECRAFT_C				// ImageCraft ICC12 Compiler
//-----------------------------------------------------------------------------

#define INT8	signed char
#define INT16	signed int
#define INT32	signed long
#define UINT8	unsigned char
#define UINT16	unsigned int
#define UINT32	unsigned long
#define BOOL	unsigned int

// Boolean values
#ifndef FALSE
#define FALSE 0
#define TRUE  1
#endif

// general bit masks
#define BM_7	0x80
#define BM_6	0x40
#define BM_5	0x20
#define BM_4	0x10
#define BM_3	0x08
#define BM_2	0x04
#define BM_1	0x02
#define BM_0	0x01

//-- Compiler dependencies ---------------------------------------------------

#ifdef METROWERKS_C
#define NOP()					asm nop
#define ENABLE_INTERRUPTS()		asm cli
#define DISABLE_INTERRUPTS()	asm sei
#endif

#ifdef IMAGECRAFT_C
#define NOP()					asm("nop")
#define ENABLE_INTERRUPTS()		asm("cli")
#define DISABLE_INTERRUPTS()	asm("sei")
#endif

#endif //__DATATYPES_H ========================================================

⌨️ 快捷键说明

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