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

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

?? rtl8019.h

?? avr版本的uip(一個超小型的TCPIP棧,支持tcpudparpicmp.
?? H
字號:
#ifndef __RTL8019_H__
#define __RTL8019_H__

/*****************************************************************************
*  Module Name:       Realtek 8019AS Driver
*  
*  Created By:        Louis Beaudoin (www.embedded-creations.com)
*
*  Original Release:  September 21, 2002 
*
*  Module Description:  
*  Provides functions to initialize the Realtek 8019AS, and send and retreive
*  packets
*
*  September 30, 2002 - Louis Beaudoin
*    Receive functions modified to handle errors encountered when receiving a
*      fast data stream.  Functions now manually retreive data instead of
*      using the send packet command.  Interface improved by checking for
*      overruns and data in the buffer internally.
*    Corrected the overrun function - overrun flag was not reset after overrun
*    Added support for the Imagecraft Compiler
*    Added support to communicate with the NIC using general I/O ports
*
*****************************************************************************/

#include "delay.h"

#include "compiler.h"

// get the MAC address from the uIP MAC address
#include "uipopt.h"


/*****************************************************************************
*  rtl8019BeginPacketSend(unsigned int packetLength)
*  Args:        unsigned int - length of the Ethernet frame (see note)
*  Created By:  Louis Beaudoin
*  Date:        September 21, 2002
*  Description: Sets up the NIC to send a packet
*  Notes:       The NIC will not send packets less than 60 bytes long (the min
*                 Ethernet frame length.  The transmit length is automatically
*                 increased to 60 bytes if packetLength is < 60
*****************************************************************************/
void rtl8019BeginPacketSend(unsigned int packetLength);


/*****************************************************************************
*  rtl8019SendPacketData(unsigned char * localBuffer, unsigned int length)
*  Args:        1. unsigned char * localBuffer - Pointer to the beginning of
*                    the buffer to load into the NIC
*               2. unsigned char length - number of bytes to copy to
*                    the NIC
*  Created By:  Louis Beaudoin
*  Date:        September 21, 2002
*  Description: Loads length # of bytes from a local buffer to the transmit
*                 packet buffer
*  Notes:       RTL8019beginPacketSend() must be called before sending
*                 any data.
*               Several calls to RTL8019retreivePacketData() may be made to 
*                 copy packet data from different buffers
*****************************************************************************/
void rtl8019SendPacketData(unsigned char * localBuffer, unsigned int length);


/*****************************************************************************
*  rtl8019EndPacketSend()
*  Created By:  Louis Beaudoin
*  Date:        September 21, 2002
*  Description: Ends a packet send operation and instructs the NIC to transmit
*                 the frame over the network
*****************************************************************************/
void rtl8019EndPacketSend(void);


/*****************************************************************************
*  rtl8019Init(void);
*
*  Created By:  Louis Beaudoin
*  Date:        September 21, 2002
*  Description: Sets up the RTL8019 NIC hardware interface, and initializes
*                 the buffers and configuration of the NIC
*****************************************************************************/
void rtl8019Init(void);


/*****************************************************************************
*  rtl8019ProcessInterrupt(void);
*
*  Created By:  Louis Beaudoin
*  Date:        September 21, 2002
*  Description: Reads the NIC's ISR register looking for a receive buffer
*                 overrun - which is then handled.
*  Notes:       The function does not need to be called in response to an
*                 interrupt.  The function can be polled and the NIC's INT
*                 line not used.  This function should be called before
*                 attempting to retreive a packet from the NIC
*****************************************************************************/
void rtl8019ProcessInterrupt(void);


/*****************************************************************************
*  unsigned int rtl8019BeginPacketRetreive()
*  Returns:     unsigned int - length of the Ethernet frame (see note)
*  Created By:  Louis Beaudoin
*  Date:        September 21, 2002
*  Description: Sets up the NIC to retreive a packet
*  Notes:       The size returned is the size of all the data in the Ethernet
*                 frame minus the Ethernet checksum.  This may include unused
*                 trailer bytes appended if data is less than the minimum
*                 Ethernet frame length (60 bytes).  A size of zero indicates
*                 there are no packets available.
*               A call to RTL8019beginPacketRetreive() must be followed by a
*                 call to RTL8019endPacketRetreive() regardless if data is
*                 retreived, unless 0 is returned.
*****************************************************************************/
unsigned int rtl8019BeginPacketRetreive(void);


/*****************************************************************************
*  rtl8019RetreivePacketData(unsigned char * localBuffer, unsigned int length)
*  Args:        1. unsigned char * localBuffer - Pointer to the beginning of
*                    the buffer to store the ethernet frame.
*               2. unsigned char length - number of bytes to copy to
*                    localBuffer
*  Created By:  Louis Beaudoin
*  Date:        September 21, 2002
*  Description: Loads length # of bytes from the receive packet buffer to
*                 a local buffer
*  Notes:       RTL8019beginPacketRetreive() must be called before retreiving
*                 any data.
*               Several calls to RTL8019retreivePacketData() may be made to 
*                 copy packet data to different buffers
*****************************************************************************/
void rtl8019RetreivePacketData(unsigned char * localBuffer,
                               unsigned int length);

/*****************************************************************************
*  rtl8019EndPacketRetreive()
*  Created By:  Louis Beaudoin
*  Date:        September 21, 2002
*  Description: Ends a packet retreive operation begun by calling
*                 RTL8019beginPacketRetreive().  The NIC buffer space used by
*                 the retreived packet is freed
*  Notes:       A packet may be removed from the buffer without being read
*                 by calling RTL8019endPacketRetreive() after
*                 RTL8019beginPacketRetreive().
*****************************************************************************/
void rtl8019EndPacketRetreive(void);


/*****************************************************************************
*
*  AVR hardware setup
*
*    External SRAM Interfaces:
*    -------------------------------------------------------------------------
*    NIC_CONNECTION == MEMORY_MAPPED
*      The NIC is mapped into memory at the OFFSET location.  The five NIC
*        address lines are taken from the externally latched signals A0-A4.
*        
*    NIC_CONNECTION == MEMORY_MAPPED_HIGHADDR
*      The five NIC address lines are taken from A8-A12 (uses the
*        non-multiplexed address port so no latch is required).  The OFFSET is
*        added to this value, so for example, you can use an offset of 0x8000 
*        and use the A15 pin as a chip select signal
*
*    General I/O Interface:
*    -------------------------------------------------------------------------
*    NIC_CONNECTION == GENERAL_IO
*      One full port is required for the data, and the first five pins from
*        another port is required for address.  The read and write pins can
*        come from another port, or be held in two of the remaining three
*        pins on the address port
*
*    One output pin is required for hard resetting the NIC (In the General I/O
*      this can be from the same port as the address and/or read/write pins)
*
*****************************************************************************/

#define GENERAL_IO 0
#define MEMORY_MAPPED_HIGHADDR 1
#define MEMORY_MAPPED 2

// set the connection type used to communicate with the NIC
#define NIC_CONNECTION MEMORY_MAPPED

#if NIC_CONNECTION != GENERAL_IO
/*** NIC Interface through External SRAM Interface ****/
#define MEMORY_MAPPED_RTL8019_OFFSET 0x8300
#else 
/************ NIC Interface through General I/O *******************/

// RTL8019 address port
#define RTL8019_ADDRESS_PORT        PORTD
#define RTL8019_ADDRESS_DDR         DDRD
#define RTL8019_ADDRESS_MASK        0x1F

// RTL8019 data port
#define RTL8019_DATA_PORT           PORTA
#define RTL8019_DATA_DDR            DDRA
#define RTL8019_DATA_PIN            PINA

// RTL8019 control port
#define RTL8019_CONTROL_PORT        PORTB
#define RTL8019_CONTROL_DDR         DDRB
#define RTL8019_CONTROL_READPIN     2
#define RTL8019_CONTROL_WRITEPIN    1

#endif /** NIC Interface **/

// RTL8019 RESET pin
#define RTL8019_RESET_PORT 	PORTD
#define RTL8019_RESET_DDR 	DDRD
#define RTL8019_RESET_PIN 	7


/*****************************************************************************
*
*  Ethernet constants
*
*****************************************************************************/
#define ETHERNET_MIN_PACKET_LENGTH	0x3C
#define ETHERNET_HEADER_LENGTH		0x0E



/*****************************************************************************
*
* MAC address assigned to the RTL8019
*
*****************************************************************************/
#define MYMAC_0 UIP_ETHADDR0
#define MYMAC_1 UIP_ETHADDR1
#define MYMAC_2 UIP_ETHADDR2
#define MYMAC_3 UIP_ETHADDR3
#define MYMAC_4 UIP_ETHADDR4
#define MYMAC_5 UIP_ETHADDR5










#endif /* __RTL8019_H__ */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
9i在线看片成人免费| 色丁香久综合在线久综合在线观看| 成人毛片视频在线观看| 国产日韩av一区| 国产伦精品一区二区三区免费迷| 欧美日韩亚洲不卡| 香蕉加勒比综合久久| 91成人网在线| 日韩高清在线一区| 日韩无一区二区| 国产精品一区二区三区99| 欧美变态凌虐bdsm| 韩国女主播成人在线观看| 日韩精品在线看片z| 国精产品一区一区三区mba桃花| 91超碰这里只有精品国产| 日韩国产高清在线| 国产亚洲女人久久久久毛片| 成人免费观看av| 亚洲国产日韩在线一区模特| 欧美日韩在线直播| 国产一区激情在线| 亚洲美女少妇撒尿| 91麻豆精品91久久久久同性| 麻豆精品新av中文字幕| 亚洲精品一区二区三区福利 | 成人av免费网站| 亚洲不卡av一区二区三区| 久久综合给合久久狠狠狠97色69| 成人av网站在线| 久久精品久久综合| 亚洲欧美日韩精品久久久久| 精品久久久久久亚洲综合网| 99免费精品视频| 蜜桃视频一区二区| 亚洲午夜激情网站| 国产精品美女久久久久aⅴ国产馆| 欧美制服丝袜第一页| 国产高清不卡一区| 激情五月婷婷综合| 日韩精品亚洲一区| 一区二区三区蜜桃网| 久久久高清一区二区三区| 在线成人高清不卡| 91久久精品一区二区三| 国产aⅴ精品一区二区三区色成熟| 日本不卡一二三| 午夜精品一区在线观看| 伊人夜夜躁av伊人久久| 中文字幕一区二区三区四区不卡| 精品免费99久久| 日韩欧美一级精品久久| 欧美一区二区三区四区久久| 色噜噜狠狠色综合欧洲selulu| 成人深夜福利app| 在线观看网站黄不卡| 欧美xxxxx裸体时装秀| 国产精品亚洲第一| 岛国精品在线观看| 色婷婷久久综合| 欧美中文字幕一区| 日韩一区二区三区电影| 久久久久高清精品| 最新欧美精品一区二区三区| 亚洲精品自拍动漫在线| 丝袜美腿一区二区三区| 免费成人在线网站| 波多野结衣在线一区| 91成人网在线| 久久丝袜美腿综合| 亚洲视频一区二区在线| 人人精品人人爱| 国产精品白丝jk黑袜喷水| 欧美偷拍一区二区| 久久精品夜色噜噜亚洲aⅴ| 亚洲欧美偷拍卡通变态| 免费观看一级特黄欧美大片| 国产不卡视频在线播放| 欧美欧美午夜aⅴ在线观看| 国产欧美精品区一区二区三区| 亚洲一级电影视频| 国产a级毛片一区| 欧美电影免费观看完整版| 亚洲色图在线播放| 国产一区视频在线看| 欧美日韩成人一区二区| 国产精品久久毛片av大全日韩| 日本在线观看不卡视频| 日本国产一区二区| 亚洲国产精品激情在线观看| 久久成人久久爱| 欧美伦理电影网| 亚洲va中文字幕| 欧美三级中文字| 亚洲成人免费av| 欧美日韩一级大片网址| 亚洲美女在线一区| 99精品视频免费在线观看| 久久久久久久免费视频了| 偷窥少妇高潮呻吟av久久免费| 一本一道波多野结衣一区二区| 国产精品久久网站| 99re这里只有精品首页| 一区二区在线电影| 在线视频欧美区| 日韩精品电影一区亚洲| 欧美日韩成人高清| 九一九一国产精品| 久久蜜臀中文字幕| 色综合久久综合| 日韩精品91亚洲二区在线观看| 日韩一级欧美一级| 国产福利视频一区二区三区| 亚洲欧洲精品一区二区精品久久久| 波多野结衣中文字幕一区| 夜夜嗨av一区二区三区中文字幕| 欧美在线free| 久久99日本精品| 国产精品久久久久毛片软件| 色香蕉久久蜜桃| 狠狠久久亚洲欧美| 亚洲国产综合在线| 欧美经典三级视频一区二区三区| 成人精品电影在线观看| 亚洲一级片在线观看| 久久久av毛片精品| 91麻豆精品国产91久久久使用方法| 精品一区二区三区不卡| 亚洲一级二级在线| 国产精品久久影院| 久久网这里都是精品| 欧美精品少妇一区二区三区| 国产成人精品亚洲日本在线桃色 | 免费观看30秒视频久久| 亚洲色图视频网| 国产亚洲精品bt天堂精选| 欧美日韩精品免费观看视频| gogo大胆日本视频一区| 国产一区在线观看视频| 精品一区二区久久久| 日本少妇一区二区| 日韩成人一级大片| 日韩av一区二区在线影视| 亚洲国产va精品久久久不卡综合| 中文在线免费一区三区高中清不卡| 日韩亚洲国产中文字幕欧美| 欧美艳星brazzers| 精品视频在线免费观看| 欧美性受极品xxxx喷水| 欧美三片在线视频观看| 欧美日韩在线不卡| 日韩一卡二卡三卡四卡| 2021国产精品久久精品| 亚洲精品一线二线三线| 国产视频一区二区在线| 中文字幕不卡在线| 一区二区三区免费网站| 青青草原综合久久大伊人精品 | 亚洲天天做日日做天天谢日日欢| 一区二区三区免费| 日日夜夜一区二区| 美女在线视频一区| 国产精品一区二区三区四区| av在线这里只有精品| 99国产精品久| 69av一区二区三区| 久久久综合视频| 亚洲h在线观看| 国产高清亚洲一区| 欧美日韩精品一区二区三区四区 | 久久99精品国产91久久来源| 国产成人自拍网| 欧美日韩视频在线观看一区二区三区 | 精品一区二区av| 91社区在线播放| 精品国产三级a在线观看| 有码一区二区三区| 高清不卡一区二区在线| 欧美久久婷婷综合色| 国产精品福利在线播放| 裸体在线国模精品偷拍| 一本大道久久精品懂色aⅴ| 欧美精品777| 亚洲一区免费观看| av在线不卡免费看| 久久天天做天天爱综合色| 日本不卡一区二区三区高清视频| www..com久久爱| 久久日韩粉嫩一区二区三区| 午夜免费欧美电影| 欧美日韩高清影院| 亚洲综合自拍偷拍| 在线观看www91| 亚洲一区二区av电影| 色狠狠一区二区| 亚洲成va人在线观看| 欧美日韩一区高清| 日韩av电影免费观看高清完整版 | 亚洲一卡二卡三卡四卡无卡久久| 日日噜噜夜夜狠狠视频欧美人 |