Dear all,
Whether to write a pci register we shall use HalSetBusDataByOffset???
If i wanted to use WRITE_PORT_UCHAR, how can i get the address of the pci
register say bus 0, device 31, function 3, offset 0x40. what is the base
address register "Base Address" in a pci device??? Whether it stores the
device's base address.
I am new to driver development so only i wanted to know...
regards,
sankarraj

RE: HalSetBusDataByOffset by Rob

Rob
Fri Nov 02 08:18:00 PDT 2007


DWORD CPCIDevice::ReadPCIReg32(DWORD dwOffset)
{
DWORD dwValue=0;

DWORD dwRet = HalGetBusDataByOffset( PCIConfiguration, m_dwBusno,
m_slotNumber.u.AsULONG, &dwValue, dwOffset-(dwOffset%4) ,sizeof(dwValue) );
return dwValue;

}//****************************************************************

Greetings,
Rob



"Sankarraj" wrote:

> Dear all,
> Whether to write a pci register we shall use HalSetBusDataByOffset???
> If i wanted to use WRITE_PORT_UCHAR, how can i get the address of the pci
> register say bus 0, device 31, function 3, offset 0x40. what is the base
> address register "Base Address" in a pci device??? Whether it stores the
> device's base address.
> I am new to driver development so only i wanted to know...
> regards,
> sankarraj