Documentation

xpcGetPCIDeviceInfo

Return information for PCI device

Prototype

int32_T xpcGetPCIDeviceInfo (uint16_T vendorId, uint16_T deviceId, uint16_T subVendorId, uint16_T subDeviceId, uint16_T bus, uint16_T slot, xpcPCIDevice *pciInfo);

Arguments

vendorId

Enter the vendor ID.

deviceId

Enter the device ID.

subVendorId

Enter the subvendor ID.

subDeviceId

Enter the subdevice ID.

bus

Enter the device bus.

slot

Enter the slot that contains the device.

pciInfo

Pointer to the PciDevice structure.

Header File

xpctarget.h

Description

The xpcGetPCIDeviceInfo function fills the structure, pciInfo, with the PCI configuration information for the specified PCI device. This information includes base address, registers, IRQ, and so forth, from the PCI BIOS. It uses the vendor and device IDs and, optionally, the subvendor and subdevice IDs to search for the board.

If you specify XPC_NO_SUB for subvendor or subdevice ID, or XPC_NO_BUS_SLOT for device slot, xpcGetPCIDeviceInfo returns the first matching board that it finds in the PCI BIOS. If you specify a bus and a slot value, the function returns only a board with matching IDs found at that bus or slot.

Supply valid vendor and device IDs. If you specify values other than XPC_NO_SUB for subvendor and subdevice IDs, the function matches the board using all four ID parameters. To find a board using only vendor ID and device ID, use XPC_NO_SUB for subDeviceId and XPC_NO_SUB for subVendorId.

This function returns 0 if it executes without detecting an error. Otherwise, it returns a nonzero value.

Was this topic helpful?