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

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

?? ethernet.c

?? 用于以太網開發
?? C
字號:
/*
 *Copyright (c) 2000-2002 Viola Systems Ltd.
 *All rights reserved.
 *
 *Redistribution and use in source and binary forms, with or without 
 *modification, are permitted provided that the following conditions 
 *are met:
 *
 *1. Redistributions of source code must retain the above copyright 
 *notice, this list of conditions and the following disclaimer.
 *
 *2. Redistributions in binary form must reproduce the above copyright 
 *notice, this list of conditions and the following disclaimer in the 
 *documentation and/or other materials provided with the distribution.
 *
 *3. The end-user documentation included with the redistribution, if 
 *any, must include the following acknowledgment:
 *	"This product includes software developed by Viola 
 *	Systems (http://www.violasystems.com/)."
 *
 *Alternately, this acknowledgment may appear in the software itself, 
 *if and wherever such third-party acknowledgments normally appear.
 *
 *4. The names "OpenTCP" and "Viola Systems" must not be used to 
 *endorse or promote products derived from this software without prior 
 *written permission. For written permission, please contact 
 *opentcp@opentcp.org.
 *
 *5. Products derived from this software may not be called "OpenTCP", 
 *nor may "OpenTCP" appear in their name, without prior written 
 *permission of the Viola Systems Ltd.
 *
 *THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED 
 *WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
 *MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
 *IN NO EVENT SHALL VIOLA SYSTEMS LTD. OR ITS CONTRIBUTORS BE LIABLE 
 *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
 *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
 *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
 *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
 *WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
 *OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
 *EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *====================================================================
 *
 *OpenTCP is the unified open source TCP/IP stack available on a series 
 *of 8/16-bit microcontrollers, please see <http://www.opentcp.org>.
 *
 *For more information on how to network-enable your devices, or how to 
 *obtain commercial technical support for OpenTCP, please see 
 *<http://www.violasystems.com/>.
 */

/** \file ethernet.c
 *	\brief OpenTCP Ethernet protocol and driver for Realtek's RTL8019AS
 *	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *		\li Vladan Jovanovic (vladan.jovanovic@violasystems.com)
 *	\version 1.0
 *	\date 19.2.2002
 *	\bug
 *	\warning
 *	\todo
 *		\li How to adopt to different MCU speeds in the code?
 *  
 *	OpenTCP implementation of Ethernet protocol and driver for
 *	Realtek's RTL8019AS Ethernet controller. Function declarations,data
 *	structures etc. may be found in inet/ethernet.h.
 */
 
#include <inet/debug.h>
#include <inet/datatypes.h>
#include <inet/system.h>
#include <inet/ethernet.h>


#include <inet/arch/config.h>

/*  >>>>>>>>>>>>>>>>>>> RENE
//UINT8	NE2000NextPktPtr;			/**< Start address of next packet in the Ethernet controller */
//UINT8 	NE2000CurrPktPtr;			/**< Start address of current packet in the Ethernet controller */
// <<<<<<<<<<<<<<<<<<<<<<

UINT8 	EtherSleep = 0;	/**< Used for storing state of Ethernet controller (0 = awake; 1 = sleeping) */

/** \brief Used for storing various information about the received Ethernet frame
 *	
 *	Fields from Ethernet packet (dest/source hardware address, 
 *	protocol, frame size, start of the Ethernet packet in Ethernet controller)
 *	are stored in this structure. These values are later used from upper
 *	layer protocols (IP, ARP). See ethernet_frame definition for more
 *	information about struct fields.
 *
 */	
struct ethernet_frame received_frame;

/** \brief Used for storing various information about the Ethernet frame that will be sent
 *	
 *	Fields from Ethernet packet (dest/source hardware address, 
 *	protocol, frame size) are stored in this structure by the
 *	upper layer protocols (IP, ARP, other). These values are 
 *	then used for initializing transmission of an Ethernet frame.
 *	See ethernet_frame definition for more
 *	information about struct fields.
 *
 */
struct ethernet_frame send_frame;



/** \brief Write data to the same NE2000 register as before
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 19.02.2002
 *	\param dat new register content
 *
 *	Invoke this function to write data to the same register as 
 *	in previously invoked outNE2000(). Saves some cycles because
 *	data direction registers and address are set up.
 *
 *	Use SEND_NETWORK_B() macro instead of invoking this function
 *	directly.
 */
void Ethernet_OutAgain (UINT8 dat)
{
}


/** \brief Write buffer data to the same NE2000 register as before
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 20.07.2003
 *	\param buf pointer to buffer from which we're taking data
 *	\param len number of bytes from buffer to write
 *
 *	Invoke this function to write data from a buffer to the same 
 *	register as in previously invoked outNE2000(). Saves some 
 *	cycles because data direction registers and address are set up.
 *
 *	Use SEND_NETWORK_BUF() macro instead of invoking this function
 *	directly.
 */
void Ethernet_OutAgainBuf (UINT8* buf, UINT16 len)
{

}



/** \brief Continue reading byte(s) from NE2000
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 19.02.2002
 *	\return Register content
 *
 *	Invoke this function to continue reading contents of a NE2000 register,
 *	usefull when reading a sequence of bytes from Ethernet controller.
 *
 *	Use RECEIVE_NETWORK_B() macro instead of directly invoking this
 *	function for easier driver change.
 */


/** \brief Read bytes from NE2000 to buffer
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 20.07.2003
 *
 *	Invoke this function to continue reading contents of a NE2000 register,
 *	only this time to a buffer directly.
 *
 *	Use RECEIVE_NETWORK_BUF() macro instead of directly invoking this
 *	function for easier driver change.
 */
void Ethernet_InAgainBuf (UINT8* buf, UINT16 len)
{
}


/** \brief Check to see if new frame has been received
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 19.02.2002
 *	\return
 *		\li #TRUE - if there is a new packet waiting
 *		\li #FALSE - if there is no new packet waiting
 *
 *	Invoke this function to check if there is a new Ethernet frame
 *	in the NIC's buffer waiting to be processed.
 */
UINT8 NE2000CheckRxFrame (void)
{
 
}

/** \brief Discard current received frame
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 19.02.2002
 *
 *	Discard the current received frame by advancing the receive circular
 *	buffer tail pointer.
 */
void NE2000DumpRxFrame (void)
{
 
 
}
 
 
/** \brief Initialize and configure RTL8019AS
 *	\ingroup core_initializer
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 19.02.2002
 *	\param mac Pointer to NIC's hardware address
 *
 *	Invoke this function at startup to properly initialize NIC's registers,
 *	HW address and operation.
 */ 
void NE2000Init (UINT8* mac)
{
}


/** \brief Check if receive-buffer overflow occured
 *	\ingroup periodic_functions
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 19.02.2002
 *
 *	This function checks if receive-buffer overflow has happened. If it did,
 *	NIC is reinitialized to ensure proper operation.
 *
 *	Invoke this function periodically to ensure proper operation under
 *	heavy load.
 */
void NE2000CheckOverFlow (void)
{
}

/** \brief Checks if new Ethernet frame exists and initializes variables
 *		accordingly
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasytems.com)
 *	\date 19.02.2002
 *	\return
 *		\li #TRUE - new frame exists, variables initialized so further
 *			processing may start
 *		\li #FALSE - no new Ethernet frame detected
 *
 *	Invoke this function periodically (better not directly but by invoking
 *	NETWORK_CHECK_IF_RECEIVED() macro) to test for newly-arrived Ethernet
 *	packets.
 *
 *	Once this function detects a new Etherent packet, internal variables 
 *	are initialized (NE2000CurrPktPtr, NE2000NextPktPtr and received_frame
 *	structure) and TRUE is returned, indicating that processing of
 *	newly-arrived frame may begin.
 */
UINT8 NE2000ReceiveFrame (void)
{
	
}

/** \brief Initialize transmission of new packet
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 19.02.2002
 *	\param page Address in Ethernet controller where outgoing packet
 *		buffered
 *
 *	This function is used to initialize transmission of an Ethernet 
 *	packet. Packet is created starting from <i>page</i> address.
 *
 *	Do not invoke this function directly, but instead use 
 *	NETWORK_SEND_INITIALIZE() macro.
 */
void InitTransmission (UINT8 page)
{

}

/** \brief Write Ethernet Header to transmission buffer
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 19.02.2002
 *	\param frame Pointer to ethernet_frame structure containing information
 *		about the new Ethernet frame
 *
 *	Invoke this function (through NETWORK_ADD_DATALINK() macro) to create
 *	an Ethernet header in the NIC's transmit buffer. Do this only after
 *	invoking NETWORK_SEND_INITIALIZE() macro.
 *
 */
void NE2000WriteEthernetHeader (struct ethernet_frame* frame)
{

}

/** \brief Initialize NE2000 in preparation for remote DMA
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 19.02.2002
 *	\param page Address for the DMA
 *
 *	
 */
void NE2000DMAInit (UINT8 page)
{
 	
}

/** \brief Initialize reading from NE2000
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 19.02.2002
 *	\param pos Position from the start of current frame from which DMA
 *		is initialized.
 *
 *	Invoke this function (through NETWORK_RECEIVE_INITIALIZE() macro) 
 *	to prepair NIC for reading from the specified position.
 */
void Ethernet_InitPosition (UINT16 pos)
{
}



/** \brief Instruct NIC to send the Ethernet frame
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 19.02.2002
 *	\param len Length of packet stored in the NIC's buffer
 *	\warning
 *		\li Minimum Ethernet packet size is 64 bytes
 *
 *	Invoke this function (through NETWORK_COMPLETE_SEND() macro) when
 *	the whole packet is formed inside NIC's memory and is ready to be 
 *	sent. Proper length of the packet must be supplied so that NIC
 *	knows how much data to put on the line.
 */
void NE2000SendFrame ( UINT16 len )
{
 	
}

/** \brief Put NE2000 to sleep mode
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 19.02.2002
 *
 *	Invoke this function to put Ethernet controller to sleep mode.
 *
 */
void NE2000EnterSleep (void) 
{
}

/** \brief Restore NE2000 from sleep mode
 * 	\author 
 *		\li Jari Lahti (jari.lahti@violasystems.com)
 *	\date 19.02.2002
 *
 *	Invoke this function to instruct NE2000 to exit sleep mode and 
 *	continue normal operation.
 */
void NE2000ExitSleep (void) 
{
		
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天av天天翘天天综合网色鬼国产 | 97精品国产露脸对白| 亚洲精品乱码久久久久久日本蜜臀| 国产精品一区不卡| 日本欧美一区二区在线观看| 欧美精品一区二| 3d成人h动漫网站入口| 一本一本大道香蕉久在线精品| 国产suv精品一区二区6| 美女网站在线免费欧美精品| 亚洲一区二区三区四区不卡| 综合激情成人伊人| 久久综合一区二区| 欧美xxxxxxxxx| 日韩一级视频免费观看在线| 欧美日韩第一区日日骚| 色诱视频网站一区| 91丨九色丨蝌蚪富婆spa| 极品少妇一区二区三区精品视频| 亚洲国产一二三| 亚洲va韩国va欧美va精品| 夜夜亚洲天天久久| 亚洲综合在线第一页| 欧美电视剧免费全集观看| 日韩电影一二三区| 日韩国产欧美三级| 日韩高清国产一区在线| 中文字幕在线观看不卡视频| 中文一区在线播放| 亚洲欧美日韩国产综合| 一区二区免费在线播放| 舔着乳尖日韩一区| 国产黄色精品网站| 欧美亚洲日本一区| 亚洲视频在线一区观看| 亚洲免费观看高清完整版在线观看熊| 色88888久久久久久影院野外| 成人免费高清在线| 91视频精品在这里| 欧美一区二区在线观看| 一色屋精品亚洲香蕉网站| 亚洲精品免费一二三区| 一区二区三区四区中文字幕| 日韩av二区在线播放| 成人av在线影院| 日韩免费高清视频| 久久久久久免费网| 国产偷国产偷精品高清尤物| 亚洲国产欧美日韩另类综合| 国产99精品视频| 精品日韩一区二区三区免费视频| 亚洲视频精选在线| 高清在线成人网| 久久久午夜精品| 蜜桃在线一区二区三区| 欧美视频在线观看一区二区| 国产精品欧美一区二区三区| 丰满少妇久久久久久久| 国产xxx精品视频大全| 成人免费av网站| 亚洲国产精品t66y| 7777精品伊人久久久大香线蕉完整版 | 日韩视频一区二区三区在线播放| 亚洲视频中文字幕| 国产91精品在线观看| 久久精品一二三| 91丨九色丨蝌蚪丨老版| 国产成人av电影| 在线不卡免费av| 午夜国产精品一区| |精品福利一区二区三区| 激情综合色播激情啊| 99re视频这里只有精品| 国产色爱av资源综合区| 国产自产v一区二区三区c| 91精品国产福利| 日本午夜一本久久久综合| 欧美老人xxxx18| 午夜精品久久久久久久久久| 精品视频一区 二区 三区| 尤物在线观看一区| 欧美日韩中文一区| 日本特黄久久久高潮| 91精品国产91久久久久久最新毛片| 亚洲国产精品久久艾草纯爱 | 欧美一级夜夜爽| 日韩精品久久理论片| 欧美一区二区三区电影| 日韩成人精品在线观看| 日韩亚洲欧美中文三级| 久久99精品国产麻豆不卡| 久久婷婷一区二区三区| 成人av在线影院| 亚洲一区二区三区中文字幕在线| 欧美亚洲高清一区| 免费成人美女在线观看.| 欧美成人艳星乳罩| 老司机免费视频一区二区三区| 久久国产精品99精品国产 | 成人手机电影网| 91麻豆自制传媒国产之光| 欧美性感一类影片在线播放| 91精品国产综合久久小美女| 在线精品视频小说1| 色婷婷亚洲精品| 欧美成人vr18sexvr| 欧美国产一区二区在线观看| 一个色综合网站| 精品久久国产老人久久综合| 日本一区中文字幕| 久久久久久99精品| 99精品欧美一区二区三区小说| 亚洲福利视频一区| 久久久99免费| 欧美日韩视频第一区| 国内久久精品视频| 亚洲欧美日韩一区二区| 日韩久久免费av| 色成人在线视频| 国产伦精一区二区三区| 亚洲一卡二卡三卡四卡五卡| 欧美一级片免费看| 91蜜桃婷婷狠狠久久综合9色| 日韩电影免费一区| 亚洲三级久久久| 久久久国际精品| 日韩小视频在线观看专区| 欧美在线免费观看视频| 成人三级伦理片| 国内久久婷婷综合| 日韩av电影天堂| 自拍偷拍亚洲激情| 中文字幕第一区综合| 日韩你懂的在线观看| 欧美伊人精品成人久久综合97| 成人手机在线视频| 国产美女精品在线| 美女视频一区在线观看| 亚洲福利视频一区| 亚洲一区二区三区精品在线| 国产精品三级视频| 久久亚洲欧美国产精品乐播| 欧美乱妇15p| 欧美日韩在线播放一区| 欧美视频在线一区二区三区 | 国产欧美一区二区精品仙草咪 | 久久精品视频免费观看| 欧美精品亚洲二区| 欧美视频精品在线| 在线观看视频91| 色综合久久精品| 99久久免费精品| 成人性生交大片免费看中文| 国产91在线|亚洲| 风流少妇一区二区| 成人一级黄色片| 99国产精品久久久久久久久久| 丰满放荡岳乱妇91ww| 北条麻妃国产九九精品视频| 国产一区欧美二区| 不卡电影一区二区三区| 国产一区久久久| 国产成人在线看| 成人免费看视频| 91日韩在线专区| 欧美日韩电影在线| 日韩午夜在线播放| 久久人人97超碰com| 国产日韩欧美一区二区三区乱码| 亚洲国产成人私人影院tom| 日本色综合中文字幕| 亚洲自拍偷拍麻豆| 国产精品一区在线观看你懂的| 国产精品一区二区无线| 国产精品美女一区二区| 欧美日韩免费视频| 国产成人av一区| 激情文学综合插| 国产九九视频一区二区三区| 久久国产精品色| 国产一区二区三区精品视频| 国产一区视频网站| 99精品视频在线观看| 色综合久久88色综合天天6 | 黄色成人免费在线| 国产精品视频九色porn| 欧美xxxxx牲另类人与| 久久精品亚洲麻豆av一区二区| 日韩一区二区三区av| 久久一留热品黄| 国产日韩欧美高清| 精品成人在线观看| 日韩精品一区二区三区三区免费| 久久精品一区二区三区四区| 麻豆91精品视频| 亚洲欧美精品午睡沙发| 国产成人aaa| 久久伊人蜜桃av一区二区| 日本网站在线观看一区二区三区| 欧美丰满一区二区免费视频|