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

Set or clear a bit in the PCI command register

Language

Description

C/C++
void ControlPciCommandRegBits ( HANDLE hPci, USHORT ControlBitNumber, USHORT BitEnable );
Delphi
procedure ControlPciCommandRegBits ( hPci: THandle, ControlBitNumber : Word; BitEnable: Word ); stdcall;
VB
Sub ControlPciCommandRegBits ( ByVal hPci As Long, ByVal ControlBitNumber As Integer, ByVal BitEnable As Integer )


Parameters:
hPci - the handle returned by a successful call to OpenRapidPci
ControlBitNumber - identifies the bit of the command register to modify,
BitEnable - "1" to set the bit, "0" to clear it


Comments:
The possible values for parameter ControlBitNumber are 0-9. Refer to the PCI specification for more details.