www.pudn.com > ucosins3c2410.zip > def.h


/************************************************************************** 
*                                                                         * 
*   PROJECT     : ARM port for UCOS-II                                    * 
*                                                                         * 
*   MODULE      : DEF.h                                                   * 
*                                                                         * 
*   AUTHOR      : Michael Anburaj                                         * 
*                 URL  : http://geocities.com/michaelanburaj/             * 
*                 EMAIL: michaelanburaj@hotmail.com                       * 
*                                                                         * 
*   PROCESSOR   : Any Processor                                           * 
*                                                                         * 
*   IDE         : Any IDE                                                 * 
*                                                                         * 
*   DESCRIPTION :                                                         * 
*   Common data type definition header file.                              * 
*                                                                         * 
**************************************************************************/ 
 
 
#ifndef __DEF_H__ 
#define __DEF_H__ 
 
#ifdef __cplusplus 
extern "C" { 
#endif 
 
 
/* ********************************************************************* */ 
/* Module configuration */ 
 
 
/* ********************************************************************* */ 
/* Interface macro & data definition */ 
 
#define U32 unsigned int 
#define U16 unsigned short 
#define S32 int 
#define S16 short int 
#define U8  unsigned char 
#define S8  signed char 
 
#define False 0 
#define True !False 
 
/* Sets the result on bPort */ 
#define BIT_SET(bPort,bBitMask)        (bPort |= bBitMask) 
#define BIT_CLR(bPort,bBitMask)        (bPort &= ~bBitMask) 
 
/* Returns the result */ 
#define GET_BIT_SET(bPort,bBitMask)    (bPort | bBitMask) 
#define GET_BIT_CLR(bPort,bBitMask)    (bPort & ~bBitMask) 
 
/* Returns 0 if the condition is False & a non-zero value if it is True */ 
#define TEST_BIT_SET(bPort,bBitMask)   (bPort & bBitMask) 
#define TEST_BIT_CLR(bPort,bBitMask)   ((~bPort) & bBitMask) 
 
 
/* ********************************************************************* */ 
/* Interface function definition */ 
 
 
/* ********************************************************************* */ 
 
#ifdef __cplusplus 
} 
#endif 
 
#endif /*__DEF_H__*/