2 * UDI Ne2000 NIC Driver
3 * By John Hodge (thePowersGang)
6 * - Hardware Definitions
11 #define NE2K_MEM_START 0x40
12 #define NE2K_MEM_END 0xC0
13 #define NE2K_RX_FIRST_PG (NE2K_MEM_START)
14 #define NE2K_RX_LAST_PG (NE2K_MEM_START+NE2K_RX_BUF_SIZE-1)
15 #define NE2K_RX_BUF_SIZE 0x40
16 #define NE2K_TX_FIRST_PG (NE2K_MEM_START+NE2K_RX_BUF_SIZE)
17 #define NE2K_TX_LAST_PG (NR2K_MEM_END)
18 #define NE2K_TX_BUF_SIZE 0x40
19 #define NE2K_MAX_PACKET_QUEUE 10
24 NE2K_REG_CLDA0, //!< Current Local DMA Address 0
25 NE2K_REG_CLDA1, //!< Current Local DMA Address 1
26 NE2K_REG_BNRY, //!< Boundary Pointer (for ringbuffer)
27 NE2K_REG_TSR, //!< Transmit Status Register
28 NE2K_REG_NCR, //!< collisions counter
29 NE2K_REG_FIFO, //!< (for what purpose ??)
30 NE2K_REG_ISR, //!< Interrupt Status Register
31 NE2K_REG_CRDA0, //!< Current Remote DMA Address 0
32 NE2K_REG_CRDA1, //!< Current Remote DMA Address 1
35 NE2K_REG_RSR = 12 //!< Receive Status Register
38 #define NE2K_REG_PSTART 1 //!< page start (init only)
39 #define NE2K_REG_PSTOP 2 //!< page stop (init only)
41 #define NE2K_REG_TPSR 4 //!< transmit page start address
42 #define NE2K_REG_TBCR0 5 //!< transmit byte count (low)
43 #define NE2K_REG_TBCR1 6 //!< transmit byte count (high)
45 #define NE2K_REG_RSAR0 8 //!< remote start address (lo)
46 #define NE2K_REG_RSAR1 9 //!< remote start address (hi)
47 #define NE2K_REG_RBCR0 10 //!< remote byte count (lo)
48 #define NE2K_REG_RBCR1 11 //!< remote byte count (hi)
49 #define NE2K_REG_RCR 12 //!< receive config register
50 #define NE2K_REG_TCR 13 //!< transmit config register
51 #define NE2K_REG_DCR 14 //!< data config register (init)
52 #define NE2K_REG_IMR 15 //!< interrupt mask register (init)
54 #define NE2K_REG_CURR 7
57 #define NE2K_REG_MEM 0x10
58 #define NE2K_REG_RESET 0x1F