亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ne2000end.c

?? tornado開發 三星s3c44b0x開發板 bsp
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* ne2000End.c - NE2000 END network interface driver *//* Copyright 2004-2005 Amine@263.net *//* Copyright 1984-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01o,23jul04,a_m  BSP定制 for 思創S3C44B0X黃金開發板01o,24jan02,rcs  added support for user setting the "Configuration Register A"                 or "Configuration Register B" from the load end string.01n,14jan02,dat  Removing warnings from Diab compiler01m,05dec00,dat  merge from sustaining to tor2_0_x01l,30nov00,pai  corrected the handling of EIOCSFLAGS ioctl (SPR #29423).01k,30nov00,pai  IFF_UP flag set in ne2000Start routine (SPR #32034, 34433).01j,10may00,pai  Discontinued use of splnet() (SPR #28366).  The ne2000Send()                 routine now returns END_ERR_BLOCK instead of ERROR so that                 upper-level protocols will clean up passed in mBlk.01i,28jul99,jkf  cleaned up warnings, fixed multicast support. (SPR#27921)01h,31mar99,sbs  changed atoi to strtoul for offset parameter parsing.                 (SPR #26208)01g,29mar99,dat  SPR 26119, documentation, usage of .bS/.bE01f,09feb99,fle  doc : fixed a problem with end of library description01e,27jan99,dat  removed most of the lint. (more work needed)01d,11aug98,mem  rewrote part of the overwrite recovery handling to		 avoid locking up the driver.01c,20may98,mem  added additional debug tracing, removed free of		 pMblk in ne2000PollSend().01b,06may98,mem  integrated changes from Brian Nash.01a,16mar98,mem	 written, based on drv/netif/if_ene.c.*//*DESCRIPTIONThis module implements the NE2000 Ethernet network interface driver.EXTERNAL INTERFACEThe only external interface is the ne2000EndLoad() routine, which expectsthe <initString> parameter as input.  This parameter passes in acolon-delimited string of the format:<unit>:<adrs>:<vecNum>:<intLvl>:<byteAccess>:<usePromEnetAddr>:<offset>The ne2000EndLoad() function uses strtok() to parse the string.TARGET-SPECIFIC PARAMETERS.IP <unit>A convenient holdover from the former model.  This parameter is used onlyin the string name for the driver..IP <adrs>Tells the driver where to find the ne2000..IP <vecNum>Configures the ne2000 device to generate hardware interruptsfor various events within the device. Thus, it containsan interrupt handler routine.  The driver calls sysIntConnect() to connectits interrupt handler to the interrupt vector generated as a result ofthe ne2000 interrupt..IP <intLvl>This parameter is passed to an external support routine, sysLanIntEnable(),which is described below in "External Support Requirements." This routineis called during as part of driver's initialization.  It handles anyboard-specific operations required to allow the servicing of a ne2000interrupt on targets that use additional interrupt controller devices tohelp organize and service the various interrupt sources.  This parametermakes it possible for this driver to avoid all board-specific knowledge ofsuch devices..IP <byteAccess>Tells the driver the NE2000 is jumpered to operate in 8-bit mode.Requires that SYS_IN_WORD_STRING() and SYS_OUT_WORD_STRING() bewritten to properly access the device in this mode..IP <usePromEnetAddr>Attempt to get the ethernet address for the device from the on-chip(board) PROM attached to the NE2000.  Will fall back to using theBSP-supplied ethernet address if this parameter is 0 or if unable toread the ethernet address..IP <offset>Specifies the memory alignment offset.EXTERNAL SUPPORT REQUIREMENTSThis driver requires several external support functions, defined as macros:.CS    SYS_INT_CONNECT(pDrvCtrl, routine, arg)    SYS_INT_DISCONNECT (pDrvCtrl, routine, arg)    SYS_INT_ENABLE(pDrvCtrl)    SYS_IN_CHAR(pDrvCtrl, reg, pData)    SYS_OUT_CHAR(pDrvCtrl, reg, pData)    SYS_IN_WORD_STRING(pDrvCtrl, reg, pData)    SYS_OUT_WORD_STRING(pDrvCtrl, reg, pData).CEThese macros allow the driver to be customized for BSPs that usespecial versions of these routines.The macro SYS_INT_CONNECT is used to connect the interrupt handler tothe appropriate vector.  By default it is the routine intConnect().The macro SYS_INT_DISCONNECT is used to disconnect the interrupt handler priorto unloading the module.  By default this is a dummy routine thatreturns OK.The macro SYS_INT_ENABLE is used to enable the interrupt level for theend device.  It is called once during initialization.  By default this isthe routine sysLanIntEnable(), defined in the module sysLib.o.The macro SYS_ENET_ADDR_GET is used to get the ethernet address (MAC)for the device.  The single argument to this routine is the END_DEVICEpointer.  By default this routine copies the ethernet address stored inthe global variable ne2000EndEnetAddr into the END_DEVICE structure.The macros SYS_IN_CHAR, SYS_OUT_CHAR, SYS_IN_WORD_STRING andSYS_OUT_WORD_STRING are used for accessing the ne2000 device.  Thedefault macros map these operations onto sysInByte(), sysOutByte(),sysInWordString() and sysOutWordString().INCLUDES:end.h endLib.h etherMultiLib.hSEE ALSO: muxLib, endLib.I "Writing and Enhanced Network Driver"INTERNAL: We are using the DP83905 manual as our reference. It is NE2000 compatible.*/#include "vxWorks.h"#include "endLib.h"			/* Common END structures. */#include "etherMultiLib.h"#include "netLib.h"#include "cacheLib.h"#include "lstLib.h"			/* Needed to maintain protocol list. */#include "iv.h"#include "stdlib.h"#include "sysLib.h"#include "intLib.h"#include "taskLib.h"#include "ne2000End.h"		/* Common defines. Amine: 包含BSP目錄的定制頭文件*//***** LOCAL DEFINITIONS *****/#define NE2000_ALL_INTS    (IM_OVWE | IM_TXEE | IM_RXEE | IM_PTXE | IM_PRXE)/* * AUTODIN-II, FDDI, ethernet polynomial for 32 bit CRC. * * The polynomial is expressed: * *   ( x^32 + x^26 + x^23 + x^22 + x^16 + *     x^12 + x^11 + x^10 + x^8  + x^7  + *            x^5  + x^4  + x^2  + x^1  + 1 ) = 0x04c11db7 * * Where x = base 2 (binary) and x^32 is ignored for CRC. * (x^32, is not in 32 bit value (ends at x^31) */#define CRC32_POLYNOMIAL		0x04c11db7/* Configuration items */#define END_SPEED		10000000/* Naming items */#define NE2000_DEV_NAME		"ene"#define NE2000_DEV_NAME_LEN	4/* * Default macro definitions for BSP interface. * These macros can be redefined in a wrapper file, to generate * a new module with an optimized interface. *//* Macro to connect interrupt handler to vector *//* Amine: 名稱替換sysIntConnect->intConnect,其他相同 */#ifndef SYS_INT_CONNECT#define SYS_INT_CONNECT(pDrvCtrl,rtn,arg,pResult) \	{ \	IMPORT STATUS intConnect(); \	*pResult = intConnect ((VOIDFUNCPTR *)INUM_TO_IVEC (pDrvCtrl->ivec), \			     rtn, (int)arg); \	}#endif/* Macro to disconnect interrupt handler from vector */#ifndef SYS_INT_DISCONNECT#define SYS_INT_DISCONNECT(pDrvCtrl,rtn,arg,pResult) \	{ \	*pResult = OK; /* HELP: need a real routine */ \	}#endif/* Macro to enable the appropriate interrupt level *//* Amine: 名稱替換sysLanIntEnable->intEnable,返回類型不同void->STATUS */#ifndef SYS_INT_ENABLE#define SYS_INT_ENABLE(pDrvCtrl) \	{ \	IMPORT STATUS intEnable(); \	intEnable (pDrvCtrl->ilevel); \	}#endif/* Macro to get the ethernet address from the BSP */#ifndef SYS_ENET_ADDR_GET#define SYS_ENET_ADDR_GET(pDevice) \	ne2000EnetAddrGet(pDevice)#endif/* * Macros to do a short (UINT16) access to the chip. Default * assumes a normal memory mapped device. * CPU_FAMILY is used to avoid conflict between x86 and non * x86 defintitions (proper) of these macro's.  This is * to avoid some compiler warnings. */#if     (CPU_FAMILY == I80X86)/* sysLib.h uses two declarations of sys<Blah>WordString */#ifndef SYS_OUT_CHAR#define SYS_OUT_CHAR(pDrvCtrl,addr,value) \	sysOutByte((pDrvCtrl)->base + (int) (addr),(char) (value))#endif#ifndef SYS_IN_CHAR#define SYS_IN_CHAR(pDrvCtrl,addr,pData) \	(*(pData) = (UCHAR) sysInByte((pDrvCtrl)->base + (int) (addr)))#endif/* sysLib.h head setsup to declarations of sys<Blah>WordString */#ifndef SYS_IN_WORD_STRING#define SYS_IN_WORD_STRING(pDrvCtrl,addr,pData,len) \	(sysInWordString ((pDrvCtrl)->base + (int) (addr), (short *)(pData), \			  (len)))#endif#ifndef SYS_OUT_WORD_STRING#define SYS_OUT_WORD_STRING(pDrvCtrl,addr,pData,len) \	(sysOutWordString ((pDrvCtrl)->base + (int) (addr), (short *)(pData), \			   (len)))#endif#else /* #if     (CPU_FAMILY == I80X86) */#ifndef SYS_OUT_CHAR#define SYS_OUT_CHAR(pDrvCtrl,addr,value) \    	sysOutByte((pDrvCtrl)->base + (UINT) (addr), (value))#endif#ifndef SYS_IN_CHAR#define SYS_IN_CHAR(pDrvCtrl,addr,pData) \    	(*(pData) = (UCHAR) sysInByte((pDrvCtrl)->base + (UINT) (addr)))#endif#ifndef SYS_IN_WORD_STRING#define SYS_IN_WORD_STRING(pDrvCtrl,addr,pData,len) \    	(sysInWordString ((pDrvCtrl)->base + (UINT) (addr),  \			  (UINT16 *)(pData), (len)))#endif#ifndef SYS_OUT_WORD_STRING#define SYS_OUT_WORD_STRING(pDrvCtrl,addr,pData,len) \    	(sysOutWordString ((pDrvCtrl)->base + (UINT) (addr), \			   (UINT16 *) (pData), (len)))#endif#endif /* #if     (CPU_FAMILY == I80X86) *//* A shortcut for getting the hardware address from the MIB II stuff. */#define END_HADDR(pEnd)	\		((pEnd)->mib2Tbl.ifPhysAddress.phyAddress)#define END_HADDR_LEN(pEnd) \		((pEnd)->mib2Tbl.ifPhysAddress.addrLength)/* Statistics we gather from the NE2000 */typedef struct    {    UINT collisions;    UINT crcs;    UINT aligns;    UINT missed;    UINT overruns;    UINT disabled;    UINT deferring;    UINT underruns;    UINT aborts;    UINT outofwindow;    UINT heartbeats;    UINT badPacket;    UINT shortPacket;    UINT tnoerror;    UINT rnoerror;    UINT terror;    UINT rerror;    UINT overwrite;    UINT wrapped;    UINT interrupts;    UINT reset;    UINT strayint;    UINT jabber;    } NE2000_STAT;/* * The definition of the driver control structure.  The packetBuf[] * array needs to be kept at least word-aligned as it gets passed to * SYS_OUT_WORD_STRING() and some architectures cannot handle * misaligned accesses. */typedef struct ne2000_device    {    END_OBJ		endObj;		/* The class we inherit from. */    END_ERR		lastError;	/* Last error passed to muxError */    int			lastIntError;	/* last interrupt signalled error */    int			unit;		/* unit number */    int			ivec;		/* interrupt vector */    int			ilevel;		/* interrupt level */    int			byteAccess;	/* 8-bit access mode */    int			usePromEnetAddr;/* enet addr from PROM */    ULONG		base;		/* base address */    int			offset;		/* offset for memory alignment */    char		packetBuf [NE2000_BUFSIZ];	/* long-aligned */    volatile long	flags;		/* Our local flags. */    volatile UCHAR	current;	/* current-page reg at interrupt */    volatile ULONG	imask;		/* interrupt mask */    volatile NE2000_STAT stats;		/* NE2000 stats */    UCHAR		enetAddr[6];	/* ethernet address */    UCHAR		mcastFilter[8];	/* multicast filter */    UCHAR		nextPacket;	/* where the next received packet is */    CL_POOL_ID		clPoolId;    int                 configRegA;     /* configuration register A */    int                 configRegB;     /* configuration register B */} NE2000END_DEVICE;/* Definitions for the flags field */#define END_PROMISCUOUS_FLAG	0x01#define END_RECV_HANDLING_FLAG	0x02#define END_TX_IN_PROGRESS	0x04#define END_TX_BLOCKED		0x08#define END_POLLING		0x10#define END_OVERWRITE		0x20#define END_OVERWRITE2		0x40/***** DEBUG MACROS *****/#undef DEBUG#ifdef DEBUG#   include "stdio.h"#   include "logLib.h"    int endDebug = 0;#   define ENDLOGMSG(x) \	do { \	    if (endDebug) \		logMsg x; \	   } while (0)#else#   define ENDLOGMSG(x)#endif /* ENDDEBUG *//***** LOCALS *****//* imports */IMPORT char ne2000EnetAddr[];IMPORT int endMultiLstCnt (END_OBJ *);/* forward static functions */LOCAL void	ne2000Int (NE2000END_DEVICE* pDrvCtrl);LOCAL void	ne2000HandleRcvInt (NE2000END_DEVICE* pDrvCtrl);LOCAL void	ne2000Config (NE2000END_DEVICE* pDrvCtrl,			      int intEnable);LOCAL void	ne2000OverwriteRecover (NE2000END_DEVICE* pDrvCtrl,					UCHAR cmdStatus);LOCAL int	ne2000PacketGet (NE2000END_DEVICE* pDrvCtrl, char *pData);LOCAL void	ne2000AddrFilterSet (NE2000END_DEVICE* pDrvCtrl);LOCAL UINT32 	ne2000CrcWork (UINT8 inChar, UINT32 inCrc);LOCAL void	ne2000EnetAddrGet (NE2000END_DEVICE* pDrvCtrl);LOCAL UCHAR	ne2000GetCurr (NE2000END_DEVICE* pDrvCtrl);LOCAL void	ne2000DataIn (NE2000END_DEVICE* pDrvCtrl, int eneAddress,			      int len, char* pData);LOCAL void	ne2000DataOut (NE2000END_DEVICE* pDrvCtrl, char* pData,			       int len, int eneAddress);LOCAL STATUS	ne2000Parse (NE2000END_DEVICE* pDrvCtrl, char* initString);LOCAL STATUS	ne2000MemInit (NE2000END_DEVICE* pDrvCtrl);LOCAL STATUS	ne2000PollStart (NE2000END_DEVICE* pDrvCtrl);LOCAL STATUS	ne2000PollStop (NE2000END_DEVICE* pDrvCtrl);/* END Specific interfaces. *//* This is the only externally visible interface. */END_OBJ * 	ne2000EndLoad (char* initString, void *pBSP);LOCAL STATUS	ne2000Start (void* pCookie);LOCAL STATUS	ne2000Stop (void* pCookie);LOCAL STATUS	ne2000Unload (void *pCookie);LOCAL int	ne2000Ioctl (void *pCookie, int cmd, caddr_t data);LOCAL STATUS	ne2000Send (void *pCookie, M_BLK_ID pBuf);LOCAL STATUS	ne2000MCastAdd (void *pCookie, char* pAddress);LOCAL STATUS	ne2000MCastDel (void *pCookie, char* pAddress);LOCAL STATUS	ne2000MCastGet (void *pCookie, MULTI_TABLE* pTable);LOCAL STATUS	ne2000PollSend (void *pCookie, M_BLK_ID pBuf);LOCAL STATUS	ne2000PollRecv (void *pCookie, M_BLK_ID pBuf);/* * Declare our function table.  This is static across all driver * instances. */LOCAL NET_FUNCS ne2000FuncTable =    {    (FUNCPTR) ne2000Start,	/* Function to start the device. */    (FUNCPTR) ne2000Stop,	/* Function to stop the device. */    (FUNCPTR) ne2000Unload,	/* Unloading function for the driver. */    (FUNCPTR) ne2000Ioctl,	/* Ioctl function for the driver. */    (FUNCPTR) ne2000Send,	/* Send function for the driver. */    (FUNCPTR) ne2000MCastAdd,	/* Multicast address add function for the */				/* driver. */    (FUNCPTR) ne2000MCastDel,	/* Multicast address delete function for */				/* the driver. */    (FUNCPTR) ne2000MCastGet,	/* Multicast table retrieve function for */				/* the driver. */    (FUNCPTR) ne2000PollSend,	/* Polling send function for the driver. */    (FUNCPTR) ne2000PollRecv,	/* Polling receive function for the driver. */    endEtherAddressForm, /* put address info into a NET_BUFFER */    (FUNCPTR) endEtherPacketDataGet, /* get pointer to data in NET_BUFFER */    (FUNCPTR) endEtherPacketAddrGet  /* Get packet addresses. */    };/******************************************************************************** ne2000EndLoad - initialize the driver and device** This routine initializes the driver and the device to the operational state.* All of the device specific parameters are passed in the initString.** The string contains the target specific parameters like this:** "unit:register addr:int vector:int level:shmem addr:shmem size:shmem width"** RETURNS: An END object pointer or NULL on error.*/END_OBJ* ne2000EndLoad    (    char* initString,		/* String to be parsed by the driver. */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本一区二区三区在线不卡| 日本欧美一区二区三区| 日韩午夜激情免费电影| 日韩一区二区麻豆国产| 91精品91久久久中77777| 在线观看国产91| 91精品国产欧美日韩| 欧洲生活片亚洲生活在线观看| 国产高清无密码一区二区三区| 蓝色福利精品导航| 日本中文字幕一区二区视频| 国产乱码精品一区二区三区忘忧草 | 日韩免费视频线观看| 成人高清视频免费观看| 自拍偷拍国产精品| 欧美一级在线免费| 91在线你懂得| 欧美性欧美巨大黑白大战| 成人h精品动漫一区二区三区| 性久久久久久久久| 久久激情综合网| av中文字幕在线不卡| 一本一道综合狠狠老| 日韩亚洲电影在线| 日韩一区二区三区观看| 亚洲国产日产av| 亚洲一区二区偷拍精品| 中文字幕精品一区| 欧美日韩亚洲综合一区二区三区| 国产精品日韩成人| 亚洲图片另类小说| 国产一区二区三区在线看麻豆| 日韩女优制服丝袜电影| 国产精一品亚洲二区在线视频| 热久久久久久久| 91麻豆精品秘密| www.日韩精品| 日韩欧美的一区二区| 国产精品理论在线观看| 亚洲丝袜自拍清纯另类| 国产精品久久久久久久久免费樱桃| 欧洲一区二区三区在线| 懂色av中文一区二区三区| 日韩中文字幕区一区有砖一区| 亚洲国产wwwccc36天堂| 亚洲一区二区三区在线| 成人欧美一区二区三区在线播放| 欧美在线视频全部完| 国产成人午夜视频| 欧美伦理视频网站| 欧美这里有精品| 欧美日韩国产综合一区二区三区| 亚洲chinese男男1069| 亚洲欧美偷拍三级| 久久99最新地址| 欧美日韩国产精选| 99久久精品国产观看| 日本美女一区二区三区| caoporn国产一区二区| 91精品国产高清一区二区三区| 美美哒免费高清在线观看视频一区二区 | 欧美日本韩国一区| 日韩视频免费观看高清完整版| 国产乱码一区二区三区| 麻豆成人91精品二区三区| 成人免费小视频| 日韩一区欧美小说| 日韩午夜电影av| 精品裸体舞一区二区三区| 久久精品夜夜夜夜久久| 自拍偷拍国产精品| 久久久亚洲综合| 麻豆精品视频在线| 精品国产一区二区三区av性色| 正在播放一区二区| 天天射综合影视| 欧美精品一区二区三区很污很色的| 欧美美女黄视频| 亚洲欧美日韩中文字幕一区二区三区| 欧美男生操女生| 精品欧美一区二区在线观看| 亚洲第一成人在线| 成人性生交大片免费看在线播放 | 欧美bbbbb| 久久精品人人做| 日韩国产在线一| 欧美性受xxxx黑人xyx| 亚洲视频精选在线| 久久精品人人爽人人爽| 久久综合九色综合欧美98| 国产精品996| 欧洲精品在线观看| 狠狠色丁香久久婷婷综| 欧美一区二区三区的| 黄色日韩三级电影| 26uuu精品一区二区| 色综合中文字幕| 久久不见久久见中文字幕免费| 成人av网址在线观看| 国产精品美女www爽爽爽| 亚洲影院免费观看| 一本久久综合亚洲鲁鲁五月天| 欧美蜜桃一区二区三区| 国产精品成人免费精品自在线观看| 在线电影一区二区三区| 欧美视频第二页| 亚洲福利一区二区三区| 国产午夜精品一区二区三区嫩草| 国产精品久久久久婷婷| 欧美日韩视频在线第一区 | 国产精品少妇自拍| 日韩欧美在线一区二区三区| 国产精品18久久久| 在线视频一区二区三| 国产精品伦理在线| 9人人澡人人爽人人精品| 3atv一区二区三区| 婷婷亚洲久悠悠色悠在线播放| 99久久综合国产精品| 欧美精品一区二区三区一线天视频| 亚洲电影在线播放| 99综合电影在线视频| 亚洲激情成人在线| 欧美一区二区视频在线观看| 亚洲欧美国产高清| 91一区二区在线| 性做久久久久久久久| 久久九九久久九九| 美国一区二区三区在线播放| 欧美—级在线免费片| 欧美系列一区二区| 韩国av一区二区三区在线观看| 91精品国产福利| 青青草原综合久久大伊人精品 | 欧美精品一区二区三| 日韩制服丝袜av| 久久久久久久网| 在线观看av一区| 国产在线精品一区在线观看麻豆| 中文字幕精品一区二区精品绿巨人| 成人中文字幕合集| 亚洲国产高清不卡| 91久久国产最好的精华液| 五月天久久比比资源色| 一本色道久久综合狠狠躁的推荐| 国产精品久久三区| 欧美日韩夫妻久久| 成人小视频免费在线观看| 亚洲va中文字幕| 国产精品午夜在线观看| 成人一道本在线| 亚洲成人资源网| 亚洲三级在线免费| 国产日韩av一区| 色婷婷综合久久久中文一区二区| 天天综合网 天天综合色| 亚洲同性gay激情无套| 欧美国产国产综合| 欧美精品一区二区三区一线天视频| 波多野结衣中文字幕一区二区三区 | 国产精品久久三| 久久亚洲精精品中文字幕早川悠里| 国产999精品久久久久久绿帽| 国产精品的网站| 91精品国产入口| 成人美女在线观看| 亚洲bdsm女犯bdsm网站| 亚洲精品福利视频网站| 中文字幕一区二区三区在线观看| 欧美日韩一区二区在线观看 | 91黄视频在线| 91视频免费看| 色综合久久久久久久| av不卡在线播放| 久久99精品国产.久久久久久| 成人欧美一区二区三区黑人麻豆| 欧美一区二区在线视频| 宅男噜噜噜66一区二区66| 成人不卡免费av| 99九九99九九九视频精品| 99精品一区二区| 色94色欧美sute亚洲线路一久 | 欧美在线观看视频一区二区| 99久精品国产| 91成人在线观看喷潮| 欧美视频一区二区在线观看| 国产xxx精品视频大全| 国产成人综合在线播放| 国产中文一区二区三区| 国产成人精品一区二| 成人免费视频caoporn| av激情亚洲男人天堂| 91免费观看在线| 欧美日韩一区国产| 91精品国产一区二区三区| 91麻豆免费看| 欧美日韩中字一区| 91精品国产综合久久小美女| 日韩视频一区二区| 欧美日韩不卡在线|