Community
cancel
Showing results for 
Search instead for 
Did you mean: 
DVasc
Beginner
938 Views

Using CreateFile to open HUB GPIO EG20T

I am using the API CreateFile to open the gpo EG20T hub, but is not working, I'm using the following way:

typedef struct tagGPIO_Device{HANDLE hGPIODevice; ioh_gpio_reqt gpio_reqt;} GPIO_Device;

device->hGPIODevice = NULL;

device->hGPIODevice = CreateFile((LPCWSTR)"\\\\.\\GUID_DEVINTERFACE_IOHGPIO",GENERIC_READ | GENERIC_WRITE, 0,NULL,OPEN_EXISTING,0,NULL);

The "GUID_DEVINTERFACE_IOHGPIO" I'm taking the "ioh_gpio common.h" that already have defined the values provided by intel.

 

DEFINE_GUID(GUID_DEVINTERFACE_IOHGPIO,

0xd326ab9, 0x4298, 0x4394, 0x97, 0xe8, 0xb1, 0x9d, 0xff, 0xc4, 0x9, 0x58);

I put this function to verify that it does not open and when it is falling, I think this error here "\ \ \ \. \ \ GUID_DEVINTERFACE_IOHGPIO."

if ( device->hGPIODevice == INVALID_HANDLE_VALUE){

printf("Failed to Open the GPIO device \n");

0 Kudos
0 Replies
Reply