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
Overview
Go to RapidDriver Main Page

First of all, you must describe your device with RapidDriver Explorer then install a device using PCI bus specific driver (RapidPci.sys). Then you may create and run your own application to control a PCI device for which the driver has been installed. All PCI functions/procedures are placed in RapidPci.dll interface library.

You can install the RapidPci.sys driver for many PCI devices, so every PCI device will have it's own DeviceInstance parameter value in OpenRapidPci function.

Note: In some cases we will use the "RapidPci" term assuming the RapidDriver Developer edition when we are working with a PCI device through the RapidPci.sys and RapidPci.dll.

Here is what you can do with RapidPci:

·access to PCI device configuration space, including reading/writing separate registers  
·working with the base address registers (BARs)  
·access to any I/O ports (8-, 16- and 32-bit), including reading/writing data arrays  
·obtaining pointers to access specified physical memory addresses  
·hardware interrupt handling  

To work with the driver itself the choice of programming language is not vital. At present RapidDriver package includes support of the following programming systems:

·Microsoft Visual C/C++  
·Borland Delphi  
·Borland C++ Builder  
·Microsoft Visual Basic 6.0  
·Microsoft Visual Basic .Net  
·Microsoft Visual C#