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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? lan9118.h

?? Lan9118以太網(wǎng)芯片linux驅(qū)動(dòng)程序
?? H
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/*****************************************************************************
   
Copyright (c) 2004-2005, SMSC
 
This code and information is provided as is without warranty of any kind,
either expressed or implied, including but not limited to the implied
warranties of merchantability and/or fitness for a particular purpose.
 
File name   :  lan9118.c  

Description :  Declares chip layer functions and defines.

Date            Modification                	Name        	
----            ------------                	-------				
18/02/05	Initial release V1.16		Phong Le
*****************************************************************************/

#ifndef LAN9118_H
#define LAN9118_H

/*------- includes files ----------------------------------------------------*/
// lint suppressions for StMicro/NexGen headers

// -e537	// Repeated include file



// -e607	// Parameter 'type' of macro found within string

// -e659	// Nothing follows '}' on line within struct/union/enum declaration



// -e773	// Expression-like macro not parenthesized



// -e935	// int within struct

// -e941	// Result 0 due to operand(s) equaling 0 in operation '<<'

// -e955	// Parameter name missing from prototype for function

// -e956	// Non const, non volatile static or external variable 'ngProtoList'

// -e958	// Padding is required to align member on 'n' byte boundary

// -e959	// Nominal struct size is not an even multiple of the maximum member alignment

// -e960	// a whole group of MISRA Required rules

// -e961	// a whole group of MISRA Advisory rules

// -e973	// Unary operator in macro not parenthesized



// -e1916	// Ellipsis encountered



/*lint -save*/

/*lint -e537 -e607 -e659 -e773 -e935 -e941 -e955 -e956 -e958 -e959 -e960 -e961 -e973 -e1916*/

#include <string.h>
#include <interrup.h>
#include <stdlib.h>
#include <stdio.h>
#include <ngnet.h>
#include <ngip/buf.h>
#include <ngeth.h>  
#include <ngip/ethernet.h>
#include <debug.h>
#include <stddefs.h>
#include <ngos.h>

/*
 **************************************************************
 *	BUGBUG (nw)  Dec. 16, 2004
 *
 *	When the above #include's ngnet.h, it indirectly #includes macros.h as follows:
 *      Including file ..\..\include\ngnet.h (library)
 *          Including file ..\..\include\ngos.h (library)
 *              Including file ..\..\include\ngos\cpu\st20\macros.h (library)
 *
 *	The problem is that macros.h incorrectly re-define's NULL, and there does
 *	not appear to be any good way to avoid that without changing macros.h.
 **************************************************************
 */
#ifdef _lint
#ifdef NULL
#undef NULL  /* lint -e{961,92} MISRA advisory rule 92 doesn't like undef*/
#define NULL ((void *)0)
#endif
#endif
/*lint -restore*/

typedef unsigned long DWORD;
typedef int BOOLEAN;

/* FUNCTION: 
 *   SetRegDW
 * DESCRIPTION: 
 *   Write to a memory mapped register
 * PARAMETERS:
 *   dwBase,   virtual base address of the register set.
 *	 dwOffset, offset from dwBase of register in the register set.
 *   dwVal,    the value to write to the register.
 * RETURN VALUE:
 *   none.
 */
#define SetRegDW(dwBase,dwOffset,dwVal) \
{	\
	(*(volatile DWORD *)((dwBase) + (dwOffset))) = (dwVal);	\
}

/* FUNCTION:
 *   GetRegDW
 * DESCRIPTION:
 *   Reads from a memory mapped register
 * PARAMETERS:
 *   dwBase,   virtual base address of the registers set.
 *   dwOffset, offset from dwBase of register in the register set.
 * RETURN VALUE:
 *   DWORD,    value read from register.
 */
#define GetRegDW(dwBase,dwOffset) \
	((DWORD)(*(volatile DWORD *)(dwBase + dwOffset)))

/* 
 * WriteFifo (dwBase, dwOffset, pdwBuf, dwDwordCount)
 *	Writes 'dwDwordCount' 4-byte integers starting at address 'pdwBuf'
 *	into TX fifo at address (dwBase + dwOffset)
 */
void WriteFifo(
	const DWORD dwBase,
	const DWORD dwOffset,
	const DWORD *pdwBuf,
	DWORD dwDwordCount);

/*
 * ReadFifo (dwBase, dwOffset, pdwBuf, dwDwordCount)
 * 	Reads 'dwDwordCount' 4-byte integers from RX fifo at address
 * 	(dwBase + dwOffset) and stores in memory buffer at address
 * 	pdwBuf
 */
void ReadFifo(
	const DWORD dwBase,
	const DWORD dwOffset,
	DWORD *pdwBuf,
	DWORD dwDwordCount);

/*
STRUCTURE: LAN9118_DATA
	This structure is used by the chip layer.
	It remembers where to access registers.
	It remembers revision IDs if there are subtle
	  differences between them.
	It remembers modes of operation.
	It will start tx and rx queue information
	And it may be used for other things that
	  have not been conceived yet.
	The members of this structure should be 
	considered private and only excessable from 
	the Lan_xxx functions
*/
typedef struct _LAN9118_DATA {
	NGbuf *saved_buf;	// store buffer taken out of queue but haven't
				// putted to TX fifo
	DWORD dwIdRev;

	DWORD dwPhyAddress;

	DWORD GpioSetting;

	NGushort  wLastADVatRestart;
	NGushort  wLastADV;

	NGushort eif_linkadv;
	NGubyte eif_link;
	NGubyte eif_linkcfg;

} LAN9118_DATA, * PLAN9118_DATA;

/* returns member variable 'eif_linkadv' within driver structure */
NGushort GetLinkAdv (const NGifnet * const netp);

/* sets member variable 'eif_linkadv' within driver structure */
void SetLinkAdv (const NGifnet * const netp, const NGushort value);

/* returns member variable 'eif_linkcfg' within driver structure */
NGubyte GetLinkCfg (const NGifnet * const netp);

/* sets member variable 'eif_linkcfg' within driver structure */
void SetLinkCfg (const NGifnet * const netp, const NGubyte value);

/* returns member variable 'eif_link' within driver structure */
NGubyte GetLink (const NGifnet * const netp);

/* sets member variable 'eif_link' within driver structure */
void SetLink (const NGifnet * const netp, const NGubyte value);

/* Phy_GetRegW () reads a 16-bit phy register values */
NGushort Phy_GetRegW(const NGifnet * const netp, const DWORD dwRegIndex);

/* Phy_SetRegW () writes a 16-bit phy register values */
void Phy_SetRegW(const NGifnet * const netp, DWORD dwRegIndex,NGushort wVal);

/* Phy_SetLink(netp) does link management settings */
void Phy_SetLink(const NGifnet * const netp);

/* Phy_GetLinkMode(netp) reads the current link settings */
void Phy_GetLinkMode(const NGifnet * const netp);

/* Phy_UpdateLinkMode(netp) detects any link changes */
void Phy_UpdateLinkMode(const NGifnet * const netp);

/*
 * LanDetectChipId () returns the ID of the Concord Ethernet chip.
 * 	Possible valid values are 0x115, 0x116, 0x117, 0x118
 */
DWORD LanDetectChipId (const DWORD dwLanBase);

/*
FUNCTION: Lan_WriteTxFifo
	This function is used to write a buffer to the
	Tx Fifo in PIO mode.
	This function is only intended to be called 
	  from with in other Lan_xxx functions.
*/
void Lan_WriteTxFifo(
	const DWORD dwLanBase, 
	const DWORD *pdwBuf, 
	DWORD dwDwordCount);

/*
FUNCTION: Lan_ReadRxFifo
    This function is used to read a buffer to the 
	Rx Fifo in PIO mode.
	This function is only intended to be called
	  from with in other Lan_xxx functions.
*/
void Lan_ReadRxFifo(
	const DWORD dwLanBase, 
	DWORD * pdwBuf, 
	DWORD dwDwordCount);

/*
FUNCTION: Lan_GetMacRegDW
    This function is used to read a Mac Register.
	This function is only intended to be called
	  from with in other Lan_xxx functions.
*/
DWORD Lan_GetMacRegDW(
	const DWORD dwLanBase, 
	const DWORD dwOffset);

/*
FUNCTION: Lan_SetMacRegDW
	This function is used to write a Mac register.
	This function is only intended to be called
	  from with in other Lan_xxx functions.
*/
void Lan_SetMacRegDW(
	const DWORD dwLanBase, 
	const DWORD dwOffset, 
	const DWORD dwVal);

/*
FUNCTION: Lan_GetPhyRegW
    This function is used to read a Mii/Phy register.
	This function is only intended to be called 
	  from with in other Lan_xxx functions.
*/
NGushort Lan_GetPhyRegW(
	const DWORD dwLanBase,
	const DWORD dwPhyAddress,
	const DWORD dwMiiIndex);

/*
FUNCTION: Lan_SetPhyRegW
    This function is used to write a Mii/Phy register.
	This function is only intended to be called
	  from with in other Lan_xxx functions.
*/
void Lan_SetPhyRegW(
	const DWORD dwLanBase,
	const DWORD dwPhyAddress,
	const DWORD dwMiiIndex,
	const NGushort wVal);

/*
FUNCTION: Lan_ShowRegs
    This function is used to display the registers. 
	Except the phy.
*/
void Lan_ShowRegs(const DWORD dwLanBase);

/*
FUNCTION: Lan_StopGptTimer
    This function disables Lan9118 GPT timer
*/
void Lan_StopGptTimer (const DWORD dwLanBase);

/*
FUNCTION: Lan_Initialize
  This function should be the first Lan_xxx function called
  It begins to initialize the LAN9118_DATA structure.
  It reads some ID values from the chip.
  It resets the chip.

RETURN VALUE:
	returns TRUE on Success,
	returns FALSE on Failure,
*/
BOOLEAN Lan_Initialize(const NGifnet * const netp);

/*
FUNCTION: Phy_Initialize
  This function should be called after Lan_InitializeInterrupts.
  Continues to initialize the LAN9118_DATA structure.
  It reads some phy ID values from the phy
  It resets the phy.
RETURN VALUE:
	returns TRUE on Success,
	returns FALSE on Failure,
*/
BOOLEAN Phy_Initialize(const NGifnet * const netp, DWORD dwPhyAddr);

/*
FUNCTION: Lan_EnableInterrupt
  Enables bits in INT_EN according to the set bits in dwMask
  WARNING this has thread synchronization issues. Use with caution.
*/
void Lan_EnableInterrupt(const DWORD dwLanBase,DWORD dwMask);

/*
FUNCTION: Lan_GetInterruptStatus
  Reads and returns the value in the INT_STS register.
*/
DWORD Lan_GetInterruptStatus(const DWORD dwLanBase);

/*
FUNCTION: Lan_ClearInterruptStatus
  Clears the bits in INT_STS according to the bits set in dwMask
*/
void Lan_ClearInterruptStatus(const DWORD dwLanBase,DWORD dwMask);

/*
FUNCTION: Lan_InitializeInterrupts
  Should be called after Lan_Initialize
  Should be called before the ISR is registered.
*/
void Lan_InitializeInterrupts(const DWORD dwLanBase,DWORD dwIntCfg);

/*
FUNCTION: Lan_EnableSoftwareInterrupt
  Clears a flag in the LAN9118_DATA structure
  Sets the SW_INT_EN bit of the INT_EN register
  WARNING this has thread sychronization issues. Use with caution.
*/
void Lan_EnableSoftwareInterrupt(const DWORD dwLanBase);

/*
FUNCTION: Lan_HandleSoftwareInterrupt
  Disables the SW_INT_EN bit of the INT_EN register,
  Clears the SW_INT in the INT_STS,
  Sets a flag in the LAN9118_DATA structure
*/
void Lan_HandleSoftwareInterrupt(const DWORD dwLanBase);

/*
FUNCTION: Lan_SetMacAddress sets the Mac Address
*/
void Lan_SetMacAddress(const DWORD dwLanBase,DWORD dwHigh16,DWORD dwLow32);

/*
FUNCTION: Lan_GetMacAddress gets the Mac Address
*/
void Lan_GetMacAddress(const DWORD dwLanBase,DWORD * dwHigh16,DWORD * dwLow32);

/*
FUNCTION: Lan_InitializeTx
  Prepares the LAN9118 for transmission of packets
  must be called before 
	Lan_SendPacketPIO
	Lan_CompleteTx
*/
void Lan_InitializeTx(const DWORD dwLanBase);

/*
FUNCTION: Lan_SendPacketPIO
  Sends a specified packet out on the ethernet line.
  Must first call Lan_InitializeTx
  WARNING: wPacketTag must not be 0. Zero is reserved.
*/
void Lan_SendPacketPIO(
		const DWORD dwLanBase,
		NGushort wPacketTag, 
		NGushort wPacketLength,
		NGubyte *pbPacketData);

/*
FUNCTION: Lan_CompleteTx
  Gets the Status DWORD of a previous transmission from the TX status FIFO
  If the TX Status FIFO is empty as indicated by TX_FIFO_INF then this
    function will return 0
*/
DWORD Lan_CompleteTx(const DWORD dwLanBase);

/*
FUNCTION: Lan_GetTxDataFreeSpace
  Gets the free space available in the TX fifo
*/
DWORD Lan_GetTxDataFreeSpace(const DWORD dwLanBase);

/*
FUNCTION: Lan_GetTxStatusCount
  Gets the number of TX completion status' available on the TX_STATUS_FIFO
  These can be read from Lan_CompleteTx
*/
DWORD Lan_GetTxStatusCount(const DWORD dwLanBase);

/*
FUNCTION: Lan_InitializeRx
  Prepares the LAN9118 for reception of packets
  Must be called After Lan_InitializeInterrupts
*/
void Lan_InitializeRx(const DWORD dwLanBase,DWORD dwRxCfg);

/*
FUNCTION: Lan_PopRxStatus
  If an Rx Status DWORD is available it will return it.
*/
DWORD Lan_PopRxStatus(const DWORD dwLanBase);

/* Phy_CheckLink(netp) is called periodically at every 100 msec
 * 	to check and update current link status.
 */
void Phy_CheckLink (const NGifnet * const netp);

/*
FUNCTION: Rx_FastForward
This function skips the current packet in RX fifo.
*/
void Rx_FastForward(const DWORD dwLanBase);

/*
 * LanDelayUS (dwLanBase, dwUS) delays 'dwUS' microseconds in this
 * 	function.
 */
void LanDelayUS(const DWORD dwLanBase, const DWORD dwUS);

/*
FUNCTION: update_tx_counters

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区中文字幕| 日本乱码高清不卡字幕| 日韩影院精彩在线| 尤物视频一区二区| 一区二区三区波多野结衣在线观看| 国产精品久久久久一区 | 青青草国产成人av片免费| 亚洲制服丝袜av| 亚洲国产成人91porn| 亚洲图片欧美一区| 午夜精品久久久久久久久| 亚洲一区二区成人在线观看| 亚洲一二三专区| 日韩国产高清影视| 极品美女销魂一区二区三区免费| 精品综合久久久久久8888| 国产一区视频网站| 国产成人av网站| 成人av动漫网站| 日本高清不卡一区| 欧美精品欧美精品系列| 日韩视频免费直播| 久久影院视频免费| 1024成人网色www| 亚洲一区在线观看免费 | 精品国产乱码久久久久久久久| 91麻豆精品国产| 欧美成人一区二区| 精品福利一区二区三区免费视频| 884aa四虎影成人精品一区| 欧美日韩久久一区| 91精品国产综合久久婷婷香蕉| 91精品国产91综合久久蜜臀| 欧美日韩国产小视频| 欧美性做爰猛烈叫床潮| 欧美视频你懂的| 日韩午夜中文字幕| 久久影院电视剧免费观看| 国产欧美1区2区3区| 最近日韩中文字幕| 亚洲影视在线播放| 免播放器亚洲一区| 国产呦萝稀缺另类资源| 成人h精品动漫一区二区三区| 成人性视频网站| 在线看不卡av| 日韩午夜激情免费电影| 亚洲欧洲一区二区在线播放| 一区二区三区在线视频观看58| 久久福利视频一区二区| 国产99久久久国产精品潘金 | 欧美精品一区二区三区高清aⅴ | 国产精品私人影院| 亚洲线精品一区二区三区八戒| 免费在线一区观看| www.亚洲色图| 69堂成人精品免费视频| 久久蜜桃av一区二区天堂| 亚洲色图制服丝袜| 亚洲制服丝袜av| 久久99久久久欧美国产| 不卡的电影网站| 在线电影国产精品| 国产亚洲一区字幕| 亚洲国产精品一区二区www在线| 久久精品av麻豆的观看方式| 播五月开心婷婷综合| 欧美日韩一级片在线观看| 精品国产91久久久久久久妲己 | 欧美日本韩国一区二区三区视频| 精品欧美一区二区三区精品久久| 亚洲国产精品黑人久久久| 亚洲国产精品人人做人人爽| 国内国产精品久久| 日本乱码高清不卡字幕| 2014亚洲片线观看视频免费| 一区二区三区电影在线播| 精品亚洲欧美一区| 欧美偷拍一区二区| 国产亚洲精品精华液| 午夜激情一区二区| 99在线精品免费| 91精品国产91热久久久做人人| 欧美—级在线免费片| 久久精品国产亚洲a| 欧洲国内综合视频| 欧美激情一区二区三区四区| 日本大胆欧美人术艺术动态 | 在线一区二区三区| 久久精品在线免费观看| 五月天久久比比资源色| 国产91丝袜在线观看| 日韩一区二区三区在线| 亚洲欧美日韩中文播放| 91最新地址在线播放| 久久久精品免费观看| 黄页视频在线91| 欧美一区二区播放| 日韩av高清在线观看| 欧美色综合天天久久综合精品| 一区二区三区四区蜜桃| av激情综合网| √…a在线天堂一区| 成人免费毛片app| 国产成人精品三级麻豆| 精品国产免费一区二区三区四区 | 成人一级视频在线观看| 久久精品视频免费观看| 国产毛片一区二区| 亚洲精品一区二区三区精华液| 蜜桃在线一区二区三区| 欧美精品乱人伦久久久久久| 亚洲高清视频在线| 在线观看视频一区二区欧美日韩| 中文字幕在线播放不卡一区| 日韩高清中文字幕一区| 色视频欧美一区二区三区| 最好看的中文字幕久久| 99re热这里只有精品免费视频| 国产精品日日摸夜夜摸av| 高清不卡在线观看| 国产嫩草影院久久久久| 粉嫩久久99精品久久久久久夜| 久久精品欧美一区二区三区不卡| 国产伦精品一区二区三区免费迷| 日韩免费观看2025年上映的电影| 日本sm残虐另类| 日韩欧美国产不卡| 精品综合免费视频观看| 日韩精品一二三区| 欧美videos中文字幕| 久久se这里有精品| 26uuu久久天堂性欧美| 国产激情一区二区三区四区| 欧美精品一区二区三区四区| 国产成人亚洲综合色影视| 国产欧美日韩三区| 99精品国产视频| 国产精品大尺度| 91丨九色丨黑人外教| 一区二区三区视频在线观看| 在线免费观看日韩欧美| 午夜久久久影院| 精品美女一区二区| 岛国av在线一区| 综合久久给合久久狠狠狠97色 | 麻豆国产精品官网| 久久日韩粉嫩一区二区三区| 不卡高清视频专区| 亚洲精品午夜久久久| 欧美日韩午夜精品| 日韩av中文字幕一区二区三区 | 日欧美一区二区| 精品奇米国产一区二区三区| 91麻豆123| 视频一区欧美日韩| 国产欧美精品在线观看| 欧美午夜精品久久久久久孕妇| 九九精品一区二区| 亚洲青青青在线视频| 欧美一级黄色大片| 成人性视频免费网站| 久久这里只精品最新地址| 欧美网站大全在线观看| 国产一区二区三区精品视频| 亚洲国产综合91精品麻豆| 精品黑人一区二区三区久久| 欧洲色大大久久| 国产麻豆精品视频| 奇米色777欧美一区二区| 国产精品视频一二| 日韩免费看的电影| 91女神在线视频| 国产剧情一区在线| 亚洲成av人片一区二区梦乃 | 久久久久久影视| 欧美在线综合视频| 国产成人亚洲综合a∨婷婷 | 午夜视频在线观看一区二区 | 欧美男人的天堂一二区| 国产成人综合自拍| 日本亚洲电影天堂| 亚洲视频免费在线观看| 91精品国产入口| 成人av中文字幕| 久久精品国产色蜜蜜麻豆| 一区二区三区在线观看视频| 久久久久久久久岛国免费| 欧美视频在线观看一区二区| 豆国产96在线|亚洲| 青青草97国产精品免费观看| 亚洲码国产岛国毛片在线| 精品91自产拍在线观看一区| 91黄色在线观看| 免费不卡在线视频| 午夜精品成人在线| 洋洋成人永久网站入口| 国产精品素人视频| 国产亚洲综合在线| 精品美女被调教视频大全网站|