User guide

1
Installing and Configuring Enhanced OS-9
Enhanced OS-9 for X86 PCAT 141
Description
_pci_search_device() provides a means to check whether PCI devices
are available in the system. If the system supports PCI devices and at
least one PCI device is found, _pci_search_device() will return
SUCCESS; otherwise it returns NO_DEVICE.
Header Files
MWOS/SRC/DEFS/HW/pcicnfg.h
Example
#include <const.h>
#include <pcicnfg.h>
#include <stdio.h>
#include <stdlib.h>
main()
{
pci_config_stat stat;
if (_pci_search_device(&stat) == NO_DEVICE) {
printf("There is no PCI devices on this machine.");
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
_pci_next_device() - find next PCI device
Syntax
#include <pcicnfg.h>
error_code _pci_next_device(PCI_config_stat stat);
State
System
Description
_pci_next_device() will find the next PCI device starting at the current
bus_number and device_number in the PCI_config_stat structure
pointed at by the incoming parameter stat. If another PCI device is
found, the status returned is SUCCESS, and the fields
bus_number
device_number