Home    Prev Next    
Contents
Programming For PCI Device
Overview
Programmers Guide
Scenario
Access to PCI devices information
How to work with PCI header
Accessing PCI registers
Accessing BAR0-BAR5 areas
I/O Ports control
Single read/write operations
Data array read/write operations
Accessing Physical Memory Addresses
Memory Mapping
Additional Functions
Hardware interrupts handling at user level
Common Issues
Extended options of hardware interrupt handling
PCI Support Routines And Structures
Common Procedures
OpenRapidPci
IsRapidPciOpened
CloseRapidPci
GetHardwareConfiguration
GetPciLocation
PCI specific functions
PCI Header
GetPciHeader
SetPciHeader
ReadFromPci
WriteToPci
PCI BAR Areas
GetNumOfPciBars
GetPciBarLength
GetPciBarPhysicalAddress
GetPciBarLinearAddress
ReadPciBarByte
ReadPciBarWord
ReadPciBarLong
WritePciBarByte
WritePciBarWord
WritePciBarLong
PCI Registers
ReadPciCommandReg
WritePciCommandReg
ControlPciCommandRegBits
ReadPciStatusReg
Memory Access
MapPhysToLinear
UnmapMemory
GetMem
GetMemW
GetMemL
SetMem
SetMemW
SetMemL
Direct Port I/O
GetPortByte
GetPortWord
GetPortLong
SetPortByte
SetPortWord
SetPortLong
ReadPortBuffer
WritePortBuffer
Hardware Interrupts
UnmaskPciIrq
MaskPciIrq
GetInterruptCounter
GetPciHeader
Go to RapidDriver Main Page

Reads data from the header of the device's PCI configuration space into the supplied PciConfig structure.

Language

Description

C/C++
BOOL GetPciHeader( HANDLE hPci, PCI_COMMON_CONFIG * PciConfig, USHORT wOffset, USHORT wBytes );
Delphi
function GetPciHeader ( hPci: THandle; var PciConfig: PCI_COMMON_CONFIG; wOffset: Word; wBytes: Word ): BOOL; stdcall;
VB
Function GetPciHeader ( ByVal hPci As Long, ByRef PciConfig as PCI_COMMON_CONFIG, ByVal wOffset As Integer, ByVal wBytes As Integer ) As Bool


Parameters:
hPci - the handle returned by a successful call to OpenRapidPci  
PciConfig - points to the requested information, see PCI_COMMON_CONFIG structure  
wOffset - offset in PCI header, in bytes.  
wBytes - number of bytes to read.  

Return Value :
TRUE, if the device exists or FALSE if not.

See also: SetPciHeader