User`s guide
2 PCI Drivers
PCI Device Information
Use the xpcGetPCIDeviceInf o function to get information for a PCI device in
your system. The syntax for this function is:
int xpcGetPCIDeviceInfo (uint16_T vendorId, uint16_T deviceId,
uint16_T subVendorId, u int1 6_T subDeviceId, uint16_T bus,
uint16_T slot, xpcPCIDe vice *pciInfo);
This function returns the xpcPCIDevice structure filled according to the
following:
If You Supply...
This Function....
All the parameters Looks for a device that matches all the parameters
and returns the
xpcPCIDevice structure for that
device. Use this form if you know that your system has
multiple boards from the same vendor with the same
ID and you want your user to specify the exact device .
XPC_NO_SUB for
the
subVendorId
or subDev iceId
parameter
Does not consider the subvendor or subdevice ID when
looking for a match for the specified device. It returns
the
xpcPCIDevice structure for a device that matches
the other parameters. Y ou can use this form if you
do not pla n to use the
subVendorId or sub DeviceId
values.
XPC_NO_BUS_SLOT
for the slo t for the
device
Returns the first PCI device it finds that m atches
the remaining parameters. You can u se this form if
you know that your system has only one board with
aparticularIDset.
Passing Slot Information from the Block Mask to Its Driver
xPC Target drivers use the following convention to fill in slot parameters and
retrieve slot information. Choose the convention that will work best for you.
2-4