📄 sys_define.h
字号:
/******************************************************************************
*
* The information contained herein is the exclusive property of
* Sunplus Technology Co. And shall not be distributed, reproduced,
* or disclosed in whole in part without prior written permission.
*
* (C) COPYRIGHT 2005 SUNPLUS TECHNOLOGY CO.
* ALL RIGHTS RESERVED
*
* The entire notice above must be reproduced on all authorized copies.
*
*****************************************************************************/
#ifndef _SYS_DEFINE_H
#define _SYS_DEFINE_H
// Compile time checking macros...
#define COMPILER_ASSERT(exp, tag) typedef int dummy_##tag[(exp!=0) * 2 - 1]
/**
* Basic type defines
*/
typedef unsigned char U8;
typedef unsigned short U16;
#ifndef _SPCE3200_REGISTER_H
typedef unsigned int U32;
#endif
typedef unsigned long long U64;
typedef volatile unsigned char UV8;
typedef volatile unsigned short UV16;
typedef volatile unsigned int UV32;
typedef volatile unsigned long long UV64;
typedef char S8;
typedef short S16;
typedef int S32;
typedef long long S64;
typedef volatile char SV8;
typedef volatile short SV16;
typedef volatile int SV32;
typedef volatile long long SV64;
typedef U8 BYTE;
typedef U8 CHAR;
typedef U16 WORD;
typedef U32 DWORD;
typedef U64 LONG;
typedef enum {false = 0, true} bool;
typedef bool BOOL;
typedef struct{
S16 x;
S16 y;
}POINT;
typedef struct{
U16 width;
U16 height;
}SIZE;
//Verify bits width...
COMPILER_ASSERT(sizeof( U8) == 1, U8);
COMPILER_ASSERT(sizeof(U16) == 2, U16);
COMPILER_ASSERT(sizeof(U32) == 4, U32);
COMPILER_ASSERT(sizeof(U64) == 8, U64);
COMPILER_ASSERT(sizeof( S8) == 1, S8);
COMPILER_ASSERT(sizeof(S16) == 2, S16);
COMPILER_ASSERT(sizeof(S32) == 4, S32);
COMPILER_ASSERT(sizeof(S64) == 8, S64);
#undef COMPILER_ASSERT
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL ((void *)0)
#define assert(e) ((void)0)
#endif
#endif //_SYS_DEFINE_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -