DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SCO OpenServer

pci_findclass(D3oddi)


pci_findclass -- find a PCI device given its class code

Synopsis

   #include <sys/pci.h>
      
   int pci_findclass(short base_class, short sub_class,
                     short index, struct pci_devinfo infptr);

Description

The pci_findclass( ) function locates a device on a PCI bus. Given the device's class code, and an index n, pci_findclass( ) returns details about the nth device whose class code matches the input. Index numbering begins at 0.

Arguments


base_class
base class code of the device.

sub_class
subclass code of the device.

index
indicates how many devices are to be skipped.

infptr
pointer to a pci_devinfo(D4oddi) structure.

Return Values

pci_findclass( ) returns 1 if the device is found, 0 otherwise.

Usage

Context and synchronization

Initialization context

Hardware applicability

PCI bus required.

Version applicability

oddi: 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp

SVR5 DDI compatibility

DDI drivers access PCI configuration information through the resource manager database. Use the cm_getval(D3) function to access information supported by the parameters documented on the cm_params(D5) manual page and function such as cm_read_devconfig(D3) and cm_write_devconfig(D3) to access other configuration information. Note that DDI drivers cannot access all the PCI configuration information that SCO OpenServer 5 drivers can access.

References

pci(D4oddi), pci(HW)

pci_buspresent(D3oddi), pci_finddevice(D3oddi), pci_read(D3oddi), pci_search(D3oddi), pci_specialcycle(D3oddi), pci_write(D3oddi)

``PCI'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005