/************************** MyType.h ********************************/
#ifndef _MY_TYPE_
#define _MY_TYPE_
typedef unsigned char BOOLEAN;
//typedef bit BOOLEAN;
typedef unsigned char INT8U; /* Unsigned 8 bit quantity */
typedef signed char INT8S; /* Signed 8 bit quantity */
typedef unsigned int INT16U; /* Unsigned 16 bit quantity */
typedef signed int INT16S; /* Signed 16 bit quantity */
typedef unsigned long INT32U; /* Unsigned 32 bit quantity */
typedef signed long INT32S; /* Signed 32 bit quantity */
//位掩码
#define BIT32(LOC) ((INT32U)0x01 << (LOC))
#define BIT16(LOC) ((INT16U)0x01 << (LOC))
#define BIT8(LOC) ((INT8U)0x01 << (LOC))
//假
#ifndef FALSE
#define FALSE 0
#endif
//真
#ifndef TRUE
#define TRUE 1
#endif
//成功
#ifndef SUCCESS
#define SUCCESS 0
#endif
//失败
#ifndef FAILURE
#define FAILURE 1
#endif
#endif
/************ End of file ***********/
文章评论(0条评论)
登录后参与讨论