User guide
1
Installing and Configuring Enhanced OS-9
Enhanced OS-9 for X86 PCAT 145
}
return EXIT_SUCCESS;
}
pci_find_class_code() - find PCI device based on class
code
Syntax
#include <pcicnfg.h>
error_code pci_find_class_code( u_int32 class_code,
u_int32 device_index, u_int8 *bus, u_int8 *dev);
State
System
Description
The pci_find_class_code() function will search the PCI bus for a device
with the same ’class_code’ as the one passed. If the index is nonzero,
then the device found is based on the index; for example, if index is
equal to one then the second card found with the same ’class_code’ on
a match is returned.
If such a PCI device is found, then pci_find_class_code() will return
SUCCESS and store the bus number and device number in the objects
pointed at by the bus and dev parameters respectively. The upper three
bits of the device number specify the function number for multi-function
devices.
If no PCI device is found, pci_find_device() will return NO_DEVICE.
Header Files
MWOS/SRC/DEFS/HW/pcicnfg.h
Example
#include <const.h>
#include <pcicnfg.h>
#include <stdio.h>
#include <stdlib.h>
#define NETWORK_ATM_CONTROLLER 0x020300
main()
{