net_globel.h
来自「在S3C2440上运行的"电子日历“(支持平年,闰年,星期自动调整). 开发」· C头文件 代码 · 共 70 行
H
70 行
/**---------------------版权 (c)----------------------------------------------------------***
*** 作者:颜章健 ***
*** 邮件:jenkinyan@163.com ***
*** ***
***---------------------File Info---------------------------------------------------------***
*** 创 建 人: 颜章健 ***
*** 创建日期: 2008-03-16 ***
*** 创建版本: ***
*** 文件描述: ***
***---------------------------------------------------------------------------------------***
*** 修 订 人: ***
*** 修订日期: ***
*** 修订版本: ***
*** 修订描述 ***
***---------------------------------------------------------------------------------------**/
#ifndef __net_globel_h_
#define __net_globel_h_
//#define DEBUG
//#define DBG_TIMER
#define _printf Uart0PutStr
#define MAX_NET_TIMER_HOOK 5 // 最大支持127个服务
#if MAX_NET_TIMER_HOOK > 127
#error "unsupport more than 127 timer hooks"
#endif
typedef struct _NET_PKT
{
uint8 *Data; // 数据段指针
uint16 Length; // 数据段长度
struct _NET_PKT *Next; // 下一数据段
}NET_PKT;
#include "..\..\net\tcpip\tcp.h"
#include "..\..\net\tcpip\udp.h"
#include "..\..\net\tcpip\icmp.h"
#include "..\..\net\tcpip\ip.h"
#include "..\..\net\ppp\ppp.h"
#include "..\..\net\ppp\ncp.h"
#include "..\..\net\ppp\lcp.h"
#include "..\..\net\ppp\chap.h"
#include "..\..\net\ppp\pap.h"
#include "..\..\net\ppp\md5.h"
#include "..\..\net\modem\fifo.h"
#include "..\..\net\modem\modem.h"
#include <stdlib.h> // lcp.c ,tcp.c需要使用该函数库
extern NET_LAYER NetLayer;
extern LINK_LAYER LinkLayer;
extern PHY_LAYER PhyLayer;
// 网络定时器
int NetTimerHookRegist(uint32 ms, void (*/*TimeOutAction*/)(void));
uint8 NetTimerHookDelete(int /*Handler*/);
void NetTimerInit(void);
uint32 NetTimerGetTc(void);
void __irq IRQ_NetTimer(void);
// 常用API
uint8 InetMemCmp(uint8 */*Memory1*/, uint8* /*Memory2*/, uint8 /*Length*/);
uint16 InetCheckSum(uint8 */*Data*/,uint16 /*Length*/);
void NetSystemInitial(void);
#endif
/********************************************************************************************
*** 文件结束 ***
********************************************************************************************/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?