?? sci_types.h
字號:
/******************************************************************************
** File Name: sci_types.h *
** Author: jakle zhu *
** DATE: 10/22/2001 *
** Copyright: 2001 Spreatrum, Incoporated. All Rights Reserved. *
** Description: This header file contains general types and macros that *
** are of use to all modules.The values or definitions are *
** dependent on the specified target. T_WINNT specifies *
** Windows NT based targets, otherwise the default is for *
** ARM targets. *
******************************************************************************
******************************************************************************
** Edit History *
** ------------------------------------------------------------------------- *
** DATE NAME DESCRIPTION *
** 10/22/2001 Jakle zhu Create. *
******************************************************************************/
#ifndef SCI_TYPES_H
#define SCI_TYPES_H
/**---------------------------------------------------------------------------*
** Compiler Flag *
**---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C"
{
#endif
/* ------------------------------------------------------------------------
** Constants
** ------------------------------------------------------------------------ */
#ifdef TRUE
#undef TRUE
#endif
#ifdef FALSE
#undef FALSE
#endif
#define TRUE 1 /* Boolean true value. */
#define FALSE 0 /* Boolean false value. */
#ifndef NULL
#define NULL 0
#endif
/* -----------------------------------------------------------------------
** Standard Types
** ----------------------------------------------------------------------- */
typedef unsigned char BOOLEAN;
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned long int uint32;
typedef unsigned int uint;
typedef signed char int8;
typedef signed short int16;
typedef signed long int int32;
#define LOCAL static
#define CONST const
#define VOLATILE volatile
#define PNULL ((void *) 0)
//Added by Xueliang.Wang on 28/03/2002
#define PUBLIC
//#define PRIVATE static
#define SCI_CALLBACK
#ifdef WIN32
#define PACK
#else
#define PACK __packed /* Byte alignment for communication structures.*/
#endif
/* some usefule marcos */
#define Bit(_i) ((u32) 1<<(_i))
#define MAX( _x, _y ) ( ((_x) > (_y)) ? (_x) : (_y) )
#define MIN( _x, _y ) ( ((_x) < (_y)) ? (_x) : (_y) )
#define WORD_LO(_xxx) ((uint8) ((int16)(_xxx)))
#define WORD_HI(_xxx) ((uint8) ((int16)(_xxx) >> 8))
#define RND8( _x ) ((((_x) + 7) / 8 ) * 8 ) /*rounds a number up to the nearest multiple of 8 */
#define UPCASE( _c ) ( ((_c) >= 'a' && (_c) <= 'z') ? ((_c) - 0x20) : (_c) )
#define DECCHK( _c ) ((_c) >= '0' && (_c) <= '9')
#define HEXCHK( _c ) ( ((_c) >= '0' && (_c) <= '9') ||\
((_c) >= 'A' && (_c) <= 'F') ||\
((_c) >= 'a' && (_c) <= 'f') )
#define ARR_SIZE( _a ) ( sizeof( (_a) ) / sizeof( (_a[0]) ) )
/*
@Lin.liu Added.(2002-11-19)
*/
#define BCD_EXT uint8
/**---------------------------------------------------------------------------*
** Compiler Flag *
**---------------------------------------------------------------------------*/
#ifdef __cplusplus
}
#endif
#endif /* SCI_TYPES_H */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -