Go
to RapidDriver Main PageThe PCI configuration space contains an array of base address registers (BARs). Normal PCI devices have 6 base address registers, while PCI-PCI bridges have 2 and PCI-CardBus bridges have 1 (see PCI_COMMON_CONFIG structure). These registers are used to determine and allocate the type, amount and location of PCI I/O and PCI memory space that the device can use.
RapidPci provides a set of functions to access these spaces:
ReadPciBarByte - read a byte from the specified BAR + offset
ReadPciBarWord- read a 16-bit word from the specified BAR + offset
ReadPciBarLong - read a 32-bit double word from the specified BAR + offset
WritePciBarByte - write a byte to the specified BAR + offset
WritePciBarWord - write a 16-bit word to the specified BAR + offset
WritePciBarLong - write a 32-bit double word to the specified BAR + offset
Important note: These functions serves all requests by regardless if the base address is memory address or port I/O address.