Definition in file ethernet.h.
Go to the source code of this file.
Data Structures | |
struct | ethernet_frame |
Ethernet packet header fields. More... | |
Defines | |
#define | PROTOCOL_IP 0x0800 |
#define | PROTOCOL_ARP 0x0806 |
#define | CR 0x00 |
#define | PSTART 0x01 |
#define | PSTOP 0x02 |
#define | BOUNDARY 0x03 |
#define | TPSR 0x04 |
#define | TSR 0x04 |
#define | TBCR0 0x05 |
#define | TBCR1 0x06 |
#define | ISR 0x07 |
#define | RSAR0 0x08 |
#define | RBCR0 0x0A |
#define | RCR 0x0C |
#define | TCR 0x0D |
#define | DCR 0x0E |
#define | IMR 0x0F |
#define | PAR0 0x01 |
#define | CURR 0x07 |
#define | MAR0 0x08 |
#define | IOPORT 0x10 |
#define | RXBUF_START 0x40 |
#define | RXBUF_END 0x4D |
#define | ARP_BUFFER 0x5F |
#define | ICMP_BUF 0x4D |
#define | TCP_BUF 0x53 |
#define | UDP_BUF 0x59 |
Functions | |
void | outNE2000 (UINT8, UINT8) |
Write data to NE2000 register. | |
void | outNE2000again (UINT8) |
Write data to the same NE2000 register as before. | |
UINT8 | inNE2000 (UINT8) |
Read byte from NE2000 register. | |
UINT8 | inNE2000again (void) |
Continue reading byte(s) from NE2000. | |
UINT8 | NE2000CheckRxFrame (void) |
Check to see if new frame has been received. | |
void | NE2000DumpRxFrame (void) |
Discard current received frame. | |
void | NE2000Init (UINT8 *) |
Initialize and configure RTL8019AS. | |
void | NE2000CheckOverFlow (void) |
Check if receive-buffer overflow occured. | |
UINT8 | NE2000ReceiveFrame (void) |
Checks if new Ethernet frame exists and initializes variables accordingly. | |
void | InitTransmission (UINT8) |
Initialize transmission of new packet. | |
void | NE2000WriteEthernetHeader (struct ethernet_frame *) |
Write Ethernet Header to transmission buffer. | |
void | NE2000DMAInit (UINT8) |
Initialize NE2000 in preparation for remote DMA. | |
void | NE2000DMAInit_position (UINT16) |
Initialize reading from NE2000. | |
void | NE2000SendFrame (UINT16) |
Instruct NIC to send the Ethernet frame. | |
void | NE2000EnterSleep (void) |
Put NE2000 to sleep mode. | |
void | NE2000ExitSleep (void) |
Restore NE2000 from sleep mode. |
|
IP over Ethernet Definition at line 80 of file ethernet.h. Referenced by process_ip_in(), and process_ip_out(). |
|
ARP over Ethernet Definition at line 81 of file ethernet.h. Referenced by arp_send_req(), and arp_send_response(). |
|
Command register, R/W Definition at line 85 of file ethernet.h. Referenced by InitTransmission(), NE2000CheckOverFlow(), NE2000CheckRxFrame(), NE2000DMAInit(), NE2000DMAInit_position(), NE2000DumpRxFrame(), NE2000EnterSleep(), NE2000ExitSleep(), NE2000Init(), NE2000ReceiveFrame(), and NE2000SendFrame(). |
|
Rx buffer start page, W Definition at line 86 of file ethernet.h. Referenced by NE2000Init(). |
|
Rx buffer stop page Definition at line 87 of file ethernet.h. Referenced by NE2000Init(). |
|
Address of last byte that host has read from RxBuf, R/W Definition at line 88 of file ethernet.h. Referenced by NE2000CheckOverFlow(), NE2000CheckRxFrame(), NE2000DumpRxFrame(), NE2000Init(), and NE2000ReceiveFrame(). |
|
Tx Buf start page, W Definition at line 91 of file ethernet.h. Referenced by InitTransmission(). |
|
Status of Tx, R Definition at line 92 of file ethernet.h. |
|
Length of transmittet packet Definition at line 93 of file ethernet.h. Referenced by NE2000SendFrame(). |
|
W Definition at line 94 of file ethernet.h. Referenced by NE2000SendFrame(). |
|
Interrupt status req, R/W Definition at line 95 of file ethernet.h. Referenced by NE2000CheckOverFlow(), and NE2000Init(). |
|
RemoteDMA start address, W Definition at line 96 of file ethernet.h. Referenced by InitTransmission(), NE2000DMAInit(), NE2000DMAInit_position(), and NE2000ReceiveFrame(). |
|
RemoteDMA bytecount ,W Definition at line 98 of file ethernet.h. Referenced by InitTransmission(), NE2000CheckOverFlow(), NE2000DMAInit(), NE2000DMAInit_position(), and NE2000ReceiveFrame(). |
|
Rx Conf reg, W Definition at line 100 of file ethernet.h. Referenced by NE2000CheckRxFrame(), and NE2000Init(). |
|
Tx Conf req, W Definition at line 101 of file ethernet.h. Referenced by NE2000CheckOverFlow(), and NE2000Init(). |
|
ISA bus configuration, W Definition at line 102 of file ethernet.h. Referenced by NE2000Init(). |
|
Interrupt mask register, W Definition at line 103 of file ethernet.h. |
|
Physical address ,R/W Definition at line 107 of file ethernet.h. Referenced by NE2000Init(). |
|
Current local DMA receivereg Definition at line 113 of file ethernet.h. Referenced by NE2000CheckOverFlow(), NE2000CheckRxFrame(), and NE2000Init(). |
|
Multicast address register, R/W Definition at line 114 of file ethernet.h. |
|
DMA dataregister Definition at line 118 of file ethernet.h. Referenced by InitTransmission(), NE2000DMAInit_position(), and NE2000ReceiveFrame(). |
|
3328 byte Rx Buffer Definition at line 123 of file ethernet.h. Referenced by NE2000DMAInit_position(), and NE2000Init(). |
|
(2 max packets Definition at line 124 of file ethernet.h. Referenced by NE2000DMAInit_position(), and NE2000Init(). |
|
256 byte Tx for ARP Definition at line 125 of file ethernet.h. Referenced by arp_send_req(), and arp_send_response(). |
|
1536 byte Tx for ICMP Definition at line 126 of file ethernet.h. Referenced by process_ip_out(). |
|
1536 byte Tx for TCP Definition at line 127 of file ethernet.h. Referenced by process_ip_out(). |
|
1536 byte Tx for UDP Definition at line 128 of file ethernet.h. Referenced by process_ip_out(). |
|
Definition at line 118 of file ethernet.c. References ADRBUS, DATABUS, DATADIR, DDR_OUT, IOCHRDY, and IOW. Referenced by InitTransmission(), NE2000CheckOverFlow(), NE2000CheckRxFrame(), NE2000DMAInit(), NE2000DMAInit_position(), NE2000DumpRxFrame(), NE2000EnterSleep(), NE2000ExitSleep(), NE2000Init(), NE2000ReceiveFrame(), and NE2000SendFrame(). |
|
Use SEND_NETWORK_B() macro instead of invoking this function directly. Definition at line 148 of file ethernet.c. References DATABUS, IOCHRDY, and IOW. Referenced by NE2000SendFrame(), and NE2000WriteEthernetHeader(). |
|
Definition at line 198 of file ethernet.c. References ADRBUS, DATABUS, DATADIR, DDR_IN, IOCHRDY, and IOR. Referenced by InitTransmission(), NE2000CheckOverFlow(), NE2000CheckRxFrame(), and NE2000ReceiveFrame(). |
|
Use RECEIVE_NETWORK_B() macro instead of directly invoking this function for easier driver change. Definition at line 226 of file ethernet.c. References DATABUS, IOCHRDY, and IOR. Referenced by NE2000ReceiveFrame(). |
|
Definition at line 274 of file ethernet.c. References BOUNDARY, CR, CURR, inNE2000(), outNE2000(), and RCR. Referenced by NE2000ReceiveFrame(). |
|
Definition at line 304 of file ethernet.c. References BOUNDARY, CR, NE2000NextPktPtr, and outNE2000(). |
|
Definition at line 327 of file ethernet.c. References BOUNDARY, CR, CURR, DCR, ISR, NE2000CurrPktPtr, NE2000NextPktPtr, outNE2000(), PAR0, PSTART, PSTOP, RCR, RESETPIN_NE2000, RXBUF_END, RXBUF_START, and TCR. |
|
Invoke this function periodically to ensure proper operation under heavy load. Definition at line 393 of file ethernet.c. References BOUNDARY, CR, CURR, inNE2000(), ISR, NE2000CurrPktPtr, NE2000NextPktPtr, outNE2000(), RBCR0, and TCR. |
|
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. Definition at line 482 of file ethernet.c. References BOUNDARY, ethernet_frame::buf_index, CR, ethernet_frame::destination, FALSE, ethernet_frame::frame_size, inNE2000(), inNE2000again(), IOPORT, NE2000CheckRxFrame(), NE2000CurrPktPtr, NE2000NextPktPtr, outNE2000(), ethernet_frame::protocol, RBCR0, RSAR0, and ethernet_frame::source. |
|
Do not invoke this function directly, but instead use NETWORK_SEND_INITIALIZE() macro. Definition at line 570 of file ethernet.c. References ADRBUS, CR, DATADIR, DDR_OUT, inNE2000(), IOPORT, outNE2000(), RBCR0, RSAR0, and TPSR. |
|
Definition at line 608 of file ethernet.c. References ethernet_frame::destination, outNE2000again(), ethernet_frame::protocol, and ethernet_frame::source. |
|
Definition at line 639 of file ethernet.c. References CR, outNE2000(), RBCR0, and RSAR0. |
|
Definition at line 665 of file ethernet.c. References ADRBUS, CR, DATADIR, DDR_IN, IOPORT, NE2000CurrPktPtr, outNE2000(), RBCR0, RSAR0, RXBUF_END, and RXBUF_START. |
|
Definition at line 725 of file ethernet.c. References CR, outNE2000(), outNE2000again(), TBCR0, and TBCR1. |
|
Definition at line 760 of file ethernet.c. References CR, EtherSleep, and outNE2000(). |
|
Definition at line 779 of file ethernet.c. References CR, EtherSleep, and outNE2000(). |