User guide
1
Installing and Configuring Enhanced OS-9
Enhanced OS-9 for X86 PCAT 149
pci_write_configuration_byte() - write PCI configuration
byte
Syntax
#include <pcicnfg.h>
error_code pci_write_configuration_byte(u_int32 bus,
u_int32 dev, u_int32 func, u_int32 index, u_int8 val);
State
System
Description
pci_write_configuration_byte() writes to the PCI configuration space the
byte value ’val’ 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>
main()
{
u_int8 bus, dev, func;
u_int8 cache_siz;
bus = 0; /* device on bus zero */
device = 11; /* device ID = 11 */
func = 0; /* function number = 0 */
cache_siz = 4; /* cache line size */
error = pci_write_configuration_byte(bus, dev, func,
offsetof(pci_config_reg, cache_line_siz), cache_siz);
return error;
}