compiler.h.svn-base
来自「canpie 一个can bus的协议栈 - CAN interface fo」· SVN-BASE 代码 · 共 190 行
SVN-BASE
190 行
/*****************************************************************************\* CANpie ** ** File : compiler.h ** Description : ** Author : Uwe Koppe ** e-mail : koppe@microcontrol.net ** ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ** ** History ** Vers. Date Comment Aut. ** ----- ---------- --------------------------------------------- ---- ** 0.1 04.12.1998 Initial version UK ** 0.2 29.04.1999 New data type definitions, UK ** Machine dependant definitions ** 1.0 15.06.2000 Final release UK ** 1.1 07.09.2000 New symbol for const/code UK ** *\*****************************************************************************/#ifndef _COMPILER_H_#define _COMPILER_H_#ifndef FALSE#define FALSE 0#endif#ifndef TRUE#define TRUE 1#endif//----------------------------------------------------------------------------//// Target Machine / Compiler dependant definitions //// ////----------------------------------------------------------------------------///*---------------------------------------------------------** Microsoft Visual C/C++***/#ifdef _MSC_VER#define Cp_CODE const#define Cp_EXPORT __declspec(dllexport)#define Cp_PREFIX __stdcall//#define Cp_PREFIX#define _BIT unsigned char#define _U08 unsigned char#define _S08 char#define _U16 unsigned short#define _S16 short#define _U32 unsigned long#define _S32 long#endif/* End of definition: _MSC_VER**-------------------------------------------------------*//*---------------------------------------------------------** CVI, National Instruments***/#ifdef _CVI_#define Cp_EXPORT#define Cp_PREFIX#define _BIT unsigned char#define _U08 unsigned char#define _S08 char#define _U16 unsigned short#define _S16 short#define _U32 unsigned long#define _S32 long#endif/* End of definition: _CVI_**-------------------------------------------------------*//*---------------------------------------------------------** LINUX, gcc***/#ifdef __linux__#ifdef __KERNEL__#include <linux/types.h> // data types uint8_t ... uint32_t, kernel space#else#include <stdint.h> // data types uint8_t ... uint32_t, user space#endif#define Cp_CODE const#define Cp_EXPORT#define Cp_PREFIX#define _BIT uint8_t#define _U08 uint8_t#define _S08 sint8_t#define _U16 uint16_t#define _S16 sint16_t#define _U32 uint32_t#define _S32 sint32_t#endif/* End of definition: __linux__**-------------------------------------------------------*//*---------------------------------------------------------** Keil C for 8051 cores***/#ifdef __C51__#define Cp_CODE code#define Cp_EXPORT#define Cp_PREFIX#define _BIT unsigned char#define _U08 unsigned char#define _S08 char#define _U16 unsigned short#define _S16 short#define _U32 unsigned long#define _S32 long#endif/* End of definition: __C51__**-------------------------------------------------------*//*---------------------------------------------------------** Fujitsu C Compiler for 16LX series***/#ifdef __COMPILER_FCC907__#define Cp_CODE const#define Cp_EXPORT #define Cp_PREFIX #define _BIT unsigned char#define _U08 unsigned char#define _S08 signed char#define _U16 unsigned short#define _S16 short#define _U32 unsigned long#define _S32 long#endif/* End of definition: __COMPILER_FCC907S__**-------------------------------------------------------*//*---------------------------------------------------------** Imagecraft C Compiler for Atmel AVR series***/#ifdef __ICCAVR__#define Cp_CODE const#define Cp_EXPORT#define Cp_PREFIX#define _BIT unsigned char#define _U08 unsigned char#define _S08 signed char#define _U16 unsigned short#define _S16 short#define _U32 unsigned long#define _S32 long#endif/* End of definition: __ICCAVR__**-------------------------------------------------------*/#ifndef _U32#error Data types are not defined! Please check compiler definition.#endif#endif /* _Compiler_Independent_Data_Types_ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?