Quantcast
Channel: Embedded Community : All Content - All Communities
Viewing all articles
Browse latest Browse all 3140

Trouble using Apollo Lake GPIO in Windows

$
0
0

I've been following the Windows GPIO Driver Design Guide and have the Intel Controller Driver installed; which I downloaded from here.

 

I then followed the WDK GPIO simdevice sample making only changes to the inf to load for the new ACPI device I defined in a new BIOS build.  My new ACPI device shows up in the Windows device manager, my simdevice peripheral driver loads for it and PrepareHardware hands me the 8 GpioIo I defined in ASL.  When calling WdfCmResourceListGetDescriptor(ResourcesTranslated, index); for each resource their descriptor types are CmResourceTypeConnection; as expected. Their connection class is CM_RESOURCE_CONNECTION_CLASS_GPIO and their connection type is CM_RESOURCE_CONNECTION_TYPE_GPIO_IO.  It seems like that part is working properly.

 

In order to send the IOCTL_GPIO_READ_PINS to the controller driver the sample indicates I need to:

  1. Create an IoTarget with the ParentObject set to the WDFDEVICE that my peripheral driver created.  Shown here.
  2. Open the IoTarget specifying a RequestString and the desired access levels
    1. The RequestString is created by using the RESOURCE_HUB_CREATE_PATH_FROM_ID macro.  I provide the ConnectionId of the GPIO I want to target.  The ConnectionId was provided to my driver during PrepareHardware.
  3. Create a WdfRequest and WdfMemory object with the data to pass to the IOCTL.
  4. Format the request for the IOCTL
  5. Send the IOCTL

 

However, step 2 above is failing with a STATUS_INVALID_PARAMETER.  This step is done at line 741 of the sample.

 

Any help in making the IOCTL_GPIO_READ_PINS and IOCTL_GPIO_WRITE_PINS calls to the controller driver would be greatly appreciated.


Viewing all articles
Browse latest Browse all 3140

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>