Texas Instruments TNETE211 Network Card User Manual


 
Initializing
3-2
3.1 Initializing
To initialize or to set the starting values for ThunderLAN, the device must pro-
ceed through a specific sequence of steps. This procedure assumes that the
autoconfiguration step of loading from the EEPROM to the PCI configuration
registers has already taken place.
3.1.1 Finding the Network Interface Card (NIC)
A PCI BIOS call must be performed to determine if there is a PCI card present
with a ThunderLAN controller. A ThunderLAN controller should have a
ThunderLAN device ID and should also have a vendor ID. The example code
uses the TI vendor ID. The call to find the board is:
#define TLAN_DEVICEID 0x0500 //PCI TLAN device ID)
...
#define TI_VENDORID 0x104C //PCI vendor ID
assigned to TI
...
if (PciFindDevice(TLAN_DEVICEID, TI_VENDORID, 0,
&nic.DevId))
error(”The PCI Bios can’t find a TLAN board”);
PciFindDevice is further broken down to an O/S call to the PCI interrupt service
routines in the BIOS formatted as:
//––––––––––––––––––––––––––––––––––––––––––––––––––––––––
// PCIFindDevice – Find PCI device
//
// Parameters:
// DeviceID WORD The device ID
// VendorID WORD The vendor ID
// Index WORD index (normally 0, use when more
than 1 device)
// pDev WORD* Where to put the device id
//
// Return val:
// int 0 if successful. See std return codes
in header
//––––––––––––––––––––––––––––––––––––––––––––––––––––––––