www.pudn.com > Bit1611_demo_code.rar > COMMON.H


/* ********************************************************************** 
 
         Copyright (c) 2002-2006 Beyond Innovation Technology Co., Ltd 
 
        All rights are reserved. Reproduction in whole or in parts is 
    prohibited without the prior written consent of the copyright owner. 
   ---------------------------------------------------------------------- 
 
    Module: COMMON.H - 
 
    Purpose: Interface of COMMON. 
 
    Version: 0.01                                   07:28PM  2005/05/13 
 
    Compiler: Keil 8051 C Compiler v8.01 
 
    Reference: 
 
   ---------------------------------------------------------------------- 
    Modification: 
 
    R0.01 07:28PM  2005/05/13 Jeffrey Chang 
    Reason: 
        1. Original. 
    Solution: 
 
   ********************************************************************** */ 
 
#ifndef _COMMON_H_ 
#define _COMMON_H_ 
 
 
/* ------------------------------------ 
    Header Files 
   ------------------------------------ */ 
 
 
/* ------------------------------------ 
    Macro Definitions 
   ------------------------------------ */ 
#undef EXTERN 
 
#ifdef _COMMON_C_ 
    #define EXTERN 
#else 
    #define EXTERN  extern 
#endif 
 
 
#define FALSE       0 
#define TRUE        (! FALSE) 
 
#define LOW         0 
#define HIGH        (! LOW) 
 
#define OFF         0 
#define ON          (! OFF) 
 
#define NO          0 
#define YES         (! NO) 
 
#define MINUS       0 
#define PLUS        (! MINUS) 
 
 
/* :::::::::::::::::::::::::::::::::::: 
   :::::::::::::::::::::::::::::::::::: */ 
#define HIBYTE(word)    (word >> 8) 
#define LOBYTE(word)    ((UB8) word) 
 
/* ------------------------------------ 
    Type Definitions 
   ------------------------------------ */ 
/* [2]64 */ 
typedef bit                 BOOL;       /* Boolean */ 
 
typedef unsigned char       UB8;        /* 8-bit data */ 
typedef unsigned short int  UW16;       /*16-bit data */ 
typedef unsigned long       UW32;       /*32-bit data */ 
 
typedef signed char         SB8;        /* 8-bit data */ 
typedef signed short int    SW16;       /*16-bit data */ 
typedef signed long         SW32;       /*32-bit data */ 
 
 
/* ------------------------------------ 
    Variables Definitions/Declarations 
   ------------------------------------ */ 
 
 
/* ------------------------------------ 
    Function Prototypes 
   ------------------------------------ */ 
 
 
#endif /* _COMMON_H_ */ 
 
 
/* ********************************************************************** 
 
    Description: 
 
   ********************************************************************** */ 
 
/* %% End Of File %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */