INtime SDK Help
PciDeviceIsUsable

Checks that the given device is assigned to the current INtime node, with minimum interaction with the device header registers.

The fields wBusNum, wDeviceNum, and wFunction must be supplied in the structure before the call. This function is typically used before a call to PciReadHeader, because that call can perform write operations to the PCI header registers.

BOOLEAN PciDeviceIsUsable(
    PCIDEV *pPciDevice
);

Parameters

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

Example

Use this call before calling PciReadHeader, as follows:

PciDeviceIsUsable sample
Copy Code

PCIDEV pci;

// read the header info for device @ PCI 2:0.0

pci.wBusNum = 2;
pci.wDeviceNum = 0;
pci.wFunction = 0;
// Check device is
if (PciDeviceIsUsable(&pci)) {
    PciReadHeader(&pci);
}

 

Return Values

TRUE, if the device exists and is assigned to the current node. Otherwise FALSE.

Requirements

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