📄 type.h
字号:
#ifndef __TYPE_H__
#define __TYPE_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <string.h>
#include <stdio.h>
/**
*\name Primitive types
*@{*/
typedef unsigned char boolean;
typedef signed char int8;
typedef unsigned char uint8;
typedef short int16;
typedef int int32;
typedef unsigned short uint16;
typedef unsigned int uint32;
/**@}*/
#ifdef TRUE
#undef TRUE
#endif
#ifdef FALSE
#undef FALSE
#endif
#define FALSE (0)
#define TRUE (!FALSE)
/*
* Description:
* additional macros
*
* Remarks:
* IGNORE - indicates that the parameter is not used (for expansion)
*/
#define IGNORE(_v) ((void)(_v))
#if 1
#define ASSERT(_p) if(!(_p)) {printf("\nParameter Error : %s, %d\n",__FILE__, __LINE__); \
printf("Press any key\n\n");\
getchar();\
return;}
#else
#define ASSERT(_p)
#endif
/*
* Description:
* Inline functions implemented as macros.
*/
/**\brief The larger of __x and __y */
#define MAX(__x,__y) ((__x)>(__y)?(__x):(__y))
/**\brief The smaller of __x and __y */
#define MIN(__x,__y) ((__x)<(__y)?(__x):(__y))
/**\brief Wait for a period of time (arbitrary units) */
#define apWAIT(__t) { int32 __i=__t; while (__i>0)__i-=1; }
#ifdef __cplusplus
}
#endif
#endif /*__TYPE_H__*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -