⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eth.h

📁 51avr tcpip http协议
💻 H
字号:
//-----------------------------------------------------------------------------
// ETH.H
//
//-----------------------------------------------------------------------------


void init_8019(void);
void query_8019(void);
void page(unsigned char pagenumber);
unsigned char * rcve_frame(void);
void send_frame(unsigned char *, unsigned int);

// Port addresses	for Cirrus CS8900A Ethernet controller
#define PORT_RXTX_DATA     0
#define PORT_TX_CMD        2
#define PORT_TX_LENGTH     3
#define PORT_ISQ           4
#define PORT_PKTPG_PTR     5
#define PORT_PKTPG_DATA    6


// PacketPage addresses	for Cirrus CS8900A Ethernet controller
#define PKTPG_EISA_NUM     0x0000
#define PKTPG_PRODUCT_ID   0x0002
#define PKTPG_IO_BASE      0x0020
#define PKTPG_INT_NUM      0x0022
#define PKTPG_MEM_BASE     0x002C
#define PKTPG_EEPROM_CMD   0x0040
#define PKTPG_EEPROM_DATA  0x0042
#define PKTPG_RX_CFG       0x0102
#define PKTPG_RX_CTL       0x0104
#define PKTPG_TX_CFG       0x0106
#define PKTPG_BUF_CFG      0x010A
#define PKTPG_LINE_CTL     0x0112
#define PKTPG_SELF_CTL     0x0114
#define PKTPG_BUS_CTL      0x0116
#define PKTPG_TEST_CTL     0x0118
#define PKTPG_ISQ          0x0120
#define PKTPG_RX_EVENT     0x0124
#define PKTPG_TX_EVENT     0x0128
#define PKTPG_BUF_EVENT    0x012C
#define PKTPG_RX_MISS      0x0130
#define PKTPG_TX_COL       0x0132
#define PKTPG_LINE_ST      0x0134
#define PKTPG_SELF_ST      0x0136
#define PKTPG_BUS_ST       0x0138
#define PKTPG_TX_CMD       0x0144
#define PKTPG_TX_LENGTH    0x0146
#define PKTPG_IND_ADDR     0x0158
#define PKTPG_RX_STATUS    0x0400
#define PKTPG_RX_LENGTH    0x0402
#define PKTPG_RX_FRAME     0x0404
#define PKTPG_TX_FRAME     0x0A00

//ADDR=0xFF00 on avrweb with power modual
//AADR=0xD000 on avrwev with usb disk
#define reg00   *(unsigned char*) 0xD000   //reg00- 10为isa网卡接口的寄存器地址300-310;
#define reg01   *(unsigned char*) 0xD001
#define reg02   *(unsigned char*) 0xD002
#define reg03   *(unsigned char*) 0xD003
#define reg04   *(unsigned char*) 0xD004
#define reg05   *(unsigned char*) 0xD005
#define reg06   *(unsigned char*) 0xD006
#define reg07   *(unsigned char*) 0xD007
#define reg08   *(unsigned char*) 0xD008
#define reg09   *(unsigned char*) 0xD009
#define reg0a   *(unsigned char*) 0xD00a
#define reg0b   *(unsigned char*) 0xD00b
#define reg0c   *(unsigned char*) 0xD00c
#define reg0d   *(unsigned char*) 0xD00d
#define reg0e   *(unsigned char*) 0xD00e
#define reg0f   *(unsigned char*) 0xD00f
#define reg10   *(unsigned char*) 0xD010
#define reg1f   *(unsigned char*) 0xD01f



void eth_rcve(unsigned char *);
void eth_send(unsigned char *, unsigned char *, unsigned int, unsigned int);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -