INtime SDK Help
PciFindDevice
INtime SDK v7 > About INtime > Other system libraries > PCI Library > PciFindDevice

Locates a PCI device given the vendor and device IDs, and a device index number. This routine searches the local PCI bus and any secondary buses it finds.

If the device index given is 0, the first matching device found is returned. If greater then zero, then successive devices are skipped until the counter has reached zero. For example, to find the second device of a given type, supply the value 1 in the wDeviceIndex field of the structure.

If it is desired to return details about any device for a given vendor, the value of zero should be supplied in the wDeviceId field.

The wVendorID, wDeviceId, and wDeviceIndex fields must be initialized before making this call.

BYTE PciFindDevice(
    PCIDEV *pPciDevice
);

Parameters

pPciDevice
A pointer to a PCIDEV structure, initialized as described above.

Remarks

WARNING:   When a system designer decides to sparsely-populate the PCI structure on a given board, resulting in bus IDs with high numbers, the PCI scan can take a very long time because of having to scan a large number of empty buses. Systems with HP BIOSs are an example.

Return Values

TRUE
The given device was found. The PCIDEV structure is filled with the values from the PCI device header.
FALSE
The device was not found.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/pcibus.h pcibus.h pcibus.lib
   
See Also