📄 globldef.h.svn-base
字号:
/*
*/
/* data type define */
typedef unsigned char BYTE;
typedef unsigned char BOOL;
typedef unsigned int WORD;
typedef unsigned short DWORD;
//typedef signed long SDWORD;
#ifndef DEBUG
//# define DEBUG
#endif
#ifdef DEBUG
# include "stdio.h" /* use printf */
#endif
#ifndef MCU_C51
# define MCU_C51
#endif
#ifndef HOST_ORDER_AS_NET
# define HOST_ORDER_AS_NET
#endif
#ifndef MULTI_THREAD /* if this program is run in multithread */
//# define MULTI_THREAD
#endif
#ifdef MCU_C51
//# include "at89x52.h"
# define DT_CODE code
# define DT_XDATA xdata
# define REENTRANT_SIG reentrant
# ifdef MULTI_THREAD
# define REENTRANT_MUL reentrant
# else
# define REENTRANT_MUL
# endif
#else
# define DT_CODE
# define DT_XDATA
# define REENTRANT_SIG
# define REENTRANT_MUL
#endif
#ifndef TRUE
# define TRUE 1
#endif
#ifndef FALSE
# define FALSE 0
#endif
#ifndef NULL
# define NULL 0
#endif
#ifdef DEBUG
# define TRACE(str) printf(str)
# define VALUE(v) printf(" %x ",v)
#else
# define TRACE(str)
# define VALUE(v)
#endif
#ifndef HOST_ORDER_AS_NET
DWORD ntohl(DWORD in) REENTRANT_SIG;
WORD ntohs(WORD in) REENTRANT_SIG;
#else
# define ntohl(in) in
# define ntohs(in) in
#endif
#define htonl(in) ntohl(in)
#define htons(in) ntohs(in)
void MemCopy(void xdata *buf1,void xdata * buf2,unsigned int siz) reentrant;
//void delay(unsigned int iDelay) reentrant;
/*
* about problom of using function opointer in KeilC51
* refer to KeilC application note 129 -- Function Pointers in C51
*/
/*
1. use BL51 OVERLAY
Delete:
The fllowing function should be delete from call tree function 'main':
RTLSendPacket RTLReceivePacket EtherInput EtherOutput
Add:
EtherOutput to IPOutput and IPInput
EtherInput to NetIfTimer
RTLSendPacket to EtherOutput
RTLReceivePacket to EtherInput
2. define all these func as reentrant
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -