Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / devs / networks / rtl8029 / ne2000.h
blobe1a76f47426e8cbb8786e7b85aaf012976812fe8
1 /*
3 Header file for NE2000 driver for Prometheus PCI bridge.
5 Copyright (C) 2001-2004 Matay
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 2 as
9 published by the Free Software Foundation.
11 This program is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston,
19 MA 02111-1307, USA.
23 #include <exec/types.h>
25 #ifndef NE2000_H
26 #define NE2000_H
28 /* some register constants */
30 #define COMMAND_PAGE0 0x00
31 #define COMMAND_PAGE1 0x40
32 #define COMMAND_PAGE2 0x80
33 #define COMMAND_READ 0x08
34 #define COMMAND_WRITE 0x10
35 #define COMMAND_SEND 0x18
36 #define COMMAND_ABORT 0x20
37 #define COMMAND_TXP 0x04
38 #define COMMAND_START 0x02
39 #define COMMAND_STOP 0x01
41 #define TXCFG_COLOFFSET 0x10
42 #define TXCFG_ATDIS 0x08
43 #define TXCFG_LOOP_MASK 0x06
44 #define TXCFG_LOOP_NONE 0x00
45 #define TXCFG_LOOP_INT 0x02
46 #define TXCFG_LOOP_EXT 0x04
47 #define TXCFG_CRC 0x01
49 #define RXCFG_MONITOR 0x20
50 #define RXCFG_PROM 0x10
51 #define RXCFG_MCAST 0x08
52 #define RXCFG_BCAST 0x04
53 #define RXCFG_SHORTPKT 0x02
54 #define RXCFG_RXERR 0x01
56 #define DTCFG_FIFOTRSH 0x60
57 #define DTCFG_FIFO_8 0x40
58 #define DTCFG_AUTORM 0x10
59 #define DTCFG_LOOPSEL 0x08
60 #define DTCFG_LAS 0x04
61 #define DTCFG_BYTESWAP 0x02
62 #define DTCFG_WIDE 0x01
64 #define INT_RESET 0x80
65 #define INT_DMAFINISH 0x40
66 #define INT_COUNTEROVF 0x20
67 #define INT_OVERFLOW 0x10
68 #define INT_TXERROR 0x08
69 #define INT_RXERROR 0x04
70 #define INT_TXPACKET 0x02
71 #define INT_RXPACKET 0x01
73 #define TXS_TRANSMITTED_OK 0x01
75 #define NE2000_COMMAND 0
76 #define NE2000_PAGE_START 1
77 #define NE2000_PHYSICAL_ADDR0 1 /* register page 1 */
78 #define NE2000_PAGE_STOP 2
79 #define NE2000_BOUNDARY 3
80 #define NE2000_TX_PAGE_START 4 /* write */
81 #define NE2000_TX_STATUS 4 /* read */
82 #define NE2000_TX_COUNTER0 5
83 #define NE2000_TX_COUNTER1 6
84 #define NE2000_CURRENT_PAGE 7 /* register page 1 */
85 #define NE2000_INT_STATUS 7
86 #define NE2000_DMA_START_ADDR0 8
87 #define NE2000_DMA_START_ADDR1 9
88 #define NE2000_DMA_COUNTER0 10
89 #define NE2000_DMA_COUNTER1 11
90 #define NE2000_RX_CONFIG 12
91 #define NE2000_TX_CONFIG 13
92 #define NE2000_DATA_CONFIG 14
93 #define NE2000_INT_MASK 15
95 #define NE2000_DMA_PORT 16
96 #define NE2000_RESET_PORT 24 /* ??? */
99 struct EthFrame
101 UBYTE ef_DestAddr[6];
102 UBYTE ef_SrcAddr[6];
103 UWORD ef_Type;
104 UBYTE ef_Data[46]; /* shortest possible */
107 #endif