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

📄 compiler.h.svn-base

📁 canpie 一个can bus的协议栈 - CAN interface for embedded control - CAN interface for PC (without local
💻 SVN-BASE
字号:
/*****************************************************************************\
*  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  _CON     const
#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  _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  _CON     const
#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  _CON     code
#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  _CON     const
#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  _CON
#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__
**-------------------------------------------------------*/


/*---------------------------------------------------------
** IAR ARM compiler
**
*/
#ifdef __ICCARM__

#define  _CON     const
#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: __ICCARM__
**-------------------------------------------------------*/


/*---------------------------------------------------------
** Hi-Tech PICC18
**
*/
#ifdef HI_TECH_C

#define  _CON     const
#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: _HI_TECH_C
**-------------------------------------------------------*/

/*---------------------------------------------------------
** Metrowerks C Compiler for XGATE
**
*/
#ifdef __MWERKS__


#define  _CON     const
#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: __MWERKS__
**-------------------------------------------------------*/


/*---------------------------------------------------------
** GNU C for ARM controller
**
*/
#ifdef __arm__

#define  _CON     const
#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: __arm__
**-------------------------------------------------------*/


#ifndef  _U32
#error   Data types are not defined! Please check compiler definition.
#endif

#endif   /* _COMPILER_H_ */

⌨️ 快捷键说明

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