Adaptec 1542CP - Storage Controller Fast SCSI 10 MBps Guide de l'utilisateur Page 147

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 157
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 146
1
Installing and Configuring Enhanced OS-9
Enhanced OS-9 for X86 PCAT 147
func, offsetof(pci_config_reg, irq_line));
printf("PCI irq line = %d\n", irqline);
return EXIT_SUCCESS;
}
pci_read_configuration_word() - read PCI configuration
word
Syntax
#include <pcicnfg.h>
u_int16 pci_read_configuration_word(u_int32 bus, u_int32 dev,
u_int32 func, u_int32 index);
State
System
Description
pci_read_configuration_word() will return the PCI configuration word
value for the PCI device at ’bus’ bus number, ’dev’ device number, ’func’
function number, ’index’ offset into the configuration space.
Header File
MWOS/SRC/DEFS/HW/pcicnfg.h
Example
#include <const.h>
#include <pcicnfg.h>
#include <stdio.h>
#include <stdlib.h>
main()
{
u_int8 bus, dev, func;
u_int16 vend_id;
bus = 0; /* device on bus zero */
device = 11; /* device ID = 11 */
func = 0; /* function number = 0 */
vend_id = pci_read_configuration_word(bus, device,
func, offsetof(pci_config_reg, vendor_id));
printf("PCI vendor id = 0x%04x\n", vendor_id);
return EXIT_SUCCESS;
}
Vue de la page 146
1 2 ... 142 143 144 145 146 147 148 149 150 151 152 ... 156 157

Commentaires sur ces manuels

Pas de commentaire