Skip to Main Content Skip to Search
Product 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 the subvendor or subdevice ID, or XPC_NO_BUS_SLOT for the device slot, the function will search through the PCI BIOS and return the first board that it finds with the specified IDs. If you specify a bus and a slot value, the function will return only a board with the matching IDs found at that bus or slot.

You must supply valid vendor and device IDs. If you specify values other than XPC_NO_SUB for subvendor and subdevice IDs, the function will match 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.

See Also

xpcPCIDevice xpcShowPCIDeviceInfo

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS