Dear all,
Wince: 6.0
Processor: intel mobile
Chipset : 82855GME and 82801DBM
i already raised a question reg this and Rob told to try Halgetbusdata, but
i am not getting it here are my codes anyone help me where i am wrong, this
is a console application.
I am new to this driver development without this i couldnt able to proceed
further. Please help me....
I just wanted to access the registers in the PCI with some bus/function/device
#include "stdafx.h"
#include <ceddk.h>
#define SMBUS_BUS_NO 0x0
#define SMBUS_DEVICE_NO 0x31
#define SMBUS_FUNCTION_NO 0x3
int _tmain(int argc, TCHAR *argv[], TCHAR *envp[])
{
int ret;
printf("In SMBus function");
PCI_SLOT_NUMBER slotNumber;
PCI_COMMON_CONFIG smbus_pci_config;
slotNumber.u.AsULONG = 0;
slotNumber.u.bits.DeviceNumber = SMBUS_DEVICE_NO;
slotNumber.u.bits.FunctionNumber = SMBUS_FUNCTION_NO;
ret=HalGetBusData(PCIConfiguration, SMBUS_BUS_NO, slotNumber.u.AsULONG,
&smbus_pci_config, sizeof(smbus_pci_config));
printf("In SMbus\n Vendor ID = %0x\n Device ID =
%0x\n",smbus_pci_config.VendorID,smbus_pci_config.DeviceID);
printf("In SMbus\ndecimal Vendor ID = %d\n Device ID =
%d\n",smbus_pci_config.VendorID,smbus_pci_config.DeviceID);
printf("\nret=%d\n",ret);
return 0;
}
in sources file i added
TARGETLIBS= \
$(_WINCEROOT)\PLATFORM\xxx\ceddk.lib
(without this it is reporting an error that Halgetbusdata is not defined)