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

📄 compiler.h

📁 Filename: hal.h Target: cc2430 Author: EFU/ KJA Revised: 16/12-2005 Revision: 1.0 Description
💻 H
字号:
/*
  V0.1 Initial Release   10/July/2006  RBR
  Port over Tmote        21/December/2006 RS
*/

#ifndef COMPILER_H
#define COMPILER_H

// MSP430-GCC C/C++ compiler for MSP430 (__MSP430__)
#if defined(__MSP430__)
// Include files for MSP430
#include <io.h>
#include <signal.h>
#endif

#include <string.h>

/******************************************************************************
*******************              Commonly used types        *******************
******************************************************************************/
typedef unsigned char       BOOL;

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

// Unsigned numbers
typedef unsigned char       UINT8;
typedef unsigned short      UINT16;
typedef unsigned long       UINT32;
typedef unsigned long long	UINT64;

// Signed numbers
typedef signed char         INT8;
typedef signed short        INT16;
typedef signed long         INT32;
typedef signed long long	INT64;

#ifndef FALSE
   #define FALSE 0
#endif

#ifndef TRUE
   #define TRUE 1
#endif

#ifndef NULL
   #define NULL 0
#endif

// Useful stuff
#define BM(n) (1 << (n))
#define BF(x,b,s) (((x) & (b)) >> (s))
#define MIN(n,m) (((n) < (m)) ? (n) : (m))
#define MAX(n,m) (((n) < (m)) ? (m) : (n))
#define ABS(n) ((n < 0) ? -(n) : (n))

// Dynamic function pointer
typedef void (*VFPTR)(void);

// Char type in ROM memory
//todo: check it out!
typedef const char ROMCHAR;

// Define these compiler labels
//msp430 is little-endian
//uncomment this if compiler is BIG ENDIAN
//define LRWPAN_COMPILER_BIG_ENDIAN

//uncomment this if compiler does not support recursion
//todo: check it out!!!
//#define LRWPAN_COMPILER_NO_RECURSION

#endif

⌨️ 快捷键说明

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