#include "PalmType.h"
#include "Ne2000.h"

void Ne2000Initialize_Step1()
{
	// Initializes the card into a running state.
    XBYTE[NE2000_BASE + NIC_INTR_MASK] = 0;						// Turn off interrupts first.
    XBYTE[NE2000_BASE + NIC_COMMAND] = CR_STOP + CR_NO_DMA;		// Stop the card.
    XBYTE[NE2000_BASE + NIC_DATA_CONFIG] = DCR_AUTO_INIT + DCR_FIFO_8_BYTE;	    // Initialize the Data Configuration register.
    XBYTE[NE2000_BASE + NIC_XMIT_START] = 0xa0;					// Set Xmit start location
    XBYTE[NE2000_BASE + NIC_XMIT_CONFIG] = TCR_NO_LOOPBACK;		// Set Xmit configuration
    XBYTE[NE2000_BASE + NIC_RCV_CONFIG] = RCR_MONITOR;			// Set Receive configuration
    XBYTE[NE2000_BASE + NIC_PAGE_START] = 0x4;					// Set Receive start
    XBYTE[NE2000_BASE + NIC_PAGE_STOP] = 0xFF;					// Set Receive end
    XBYTE[NE2000_BASE + NIC_BOUNDARY] = 0x4;					// Set Receive boundary
    XBYTE[NE2000_BASE + NIC_XMIT_COUNT_LSB] = 0x3C;				// Set Xmit bytes
    XBYTE[NE2000_BASE + NIC_XMIT_COUNT_MSB] = 0x0;
}



