📄 fpubdef.h
字号:
/*#########################################################################
Copyright (c) 2005,
All rights reserved.
File name : fpubdef.h
Description :公共定义
Version :1.00
Author :
Complete Date :2006-03-27
Function List :
History :
_________________________________________________________________________
DATE AUTHOR VERSION DESCRIBE
-------------------------------------------------------------------------
2005-03-30 Ver1.00 Create
2006-03-05 Ver1.1 Modify
2006-03-27 Ver1.11 Modify ADD DATA TYPE
2006-04-03 Ver1.12 Modify Add CLASS CHECK
#########################################################################*/
#include <stddef.h>
/* Taget OS */
/*
#define __F_OS_WIN32__
#define __F_OS_UCLINUX__
*/
#define __F_OS_PCLINUX__
#define __SYS_DOUBLE_MODE__ 0 //IEEE Big End
#ifndef __F_PUBDEF_H__
#define __F_PUBDEF_H__
/* 定义*/
/**/
#define __F_DEBUG__
/*
#define __F_CODE_STATUS_0__
#define __F_CODE_STATUS_1__
#define __F_CODE_STATUS_2__
#define __F_CODE_INTERRUPT__
*/
#ifdef __cplusplus
extern "C" {
#endif
/* 函数类型*/
/*
#define FEXPORT __cdecl
#define FAPI __cdecl
*/
#define FEXPORT
#define FAPI
/* 格式化常用的数据类型 */
typedef unsigned char BYTE;
typedef unsigned char UINT8;
typedef signed char INT8;
typedef short int INT16;
typedef unsigned short int UINT16;
typedef long INT32;
typedef unsigned long UINT32;
typedef double DOUBLE;
typedef void VOID;
/* 以下数据类型随CPU的不同而不同*/
typedef int REGINT;
typedef void* PTR;
typedef BYTE OBJECT;
#ifndef __F_UNION_CODE__
typedef char CHAR;
#else
typedef short int CHAR;
#endif
/* Boolean */
typedef enum tag_Boolean
{
False=0,
True
} Boolean;
/* 断言定义 */
#ifdef __F_DEBUG__
void FAPI fassert ( CHAR *paExpress, CHAR *paFile, REGINT aLine );
#define ASSERT(e) {if((e))fassert(#e, __FILE__, __LINE__);}
#else
#define ASSERT(e) NULL
#endif /*__F_DEBUG__*/
/* 类型检查 */
#ifdef __F_DEBUG__
typedef struct tag_CLASSID
{
INT32 nClassID;
INT32 nKey;
INT32 nCode;
} CLASSID;
VOID ClassIdInit ( CLASSID *p, INT32 anClassID, INT32 anKey );
VOID ClassIdCheck( CLASSID *p, INT32 anClassID );
#define FCLASSID_BASE 0x64BA0000
#else
typedef BYTE CLASSID;
#define ClassIdInit(p,a,b) NULL
#define ClassIdCheck(p,ID) NULL
#endif /*__F_DEBUG__*/
/*统一数据类型*/
typedef union tag_UDATA
{
INT32 n32;
UINT32 u32;
INT16 n16;
UINT16 u16;
DOUBLE d;
PTR p;
BYTE b;
UINT8 u8;
} UDATA;
#ifdef __F_DEBUG__
#define DBG_MSG(MSG) printf((MSG))
#define DBG_MSG2(FMT,ARG) printf((FMT),(ARG))
#define DBG_MSG3(FMT,ARG1,ARG2) printf((FMT),(ARG1),(ARG2))
#else
#define DBG_MSG(MSG)
#define DBG_MSG2(FMT,ARG)
#define DBG_MSG3(FMT,ARG1,ARG2)
#endif
#ifdef __cplusplus
}
#endif
#endif /* __F_PUBDEF_H__*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -