GPIO driver development
Write a driver for a general-purpose I/O (GPIO) controller or for a peripheral device that connects to GPIO pins on that controller.
A GPIO controller driver handles I/O requests to read or write to groups of GPIO pins. Typically, these pins are used to communicate with peripheral devices that are attached to computer motherboards or that are embedded in mobile devices, such as smart phones.
A peripheral device that transfers data over a serial or parallel bus might, in addition, connect to GPIO pins that receive interrupt requests from the device or that send data to or from the device.
Support in Windows versions
Microsoft-provided binaries for GPIO
Windows includes GPIO driver support through these in-box binaries.
Note These binaries are included in OneCoreUAP-based editions of Windows.
Develop a GPIO controller driver
A GPIO controller driver configures GPIO pins to function as low-bandwidth data I/O channels and as inputs for device interrupts. The driver handles I/O requests to read or write to groups of GPIO pins. Typically, these pins are used to communicate with peripheral devices that are attached to computer motherboards or that are embedded in mobile devices, such as smart phones.
Your GPIO controller driver is a kernel-mode driver framework (KMDF) driver that statically links to Msgpioclxstub.lib. At run time, Msgpioclxstub.lib dynamically links to Msgpioclx.sys. Your driver communicates with Msgpioclx.sys.
Develop a peripheral driver
A peripheral device driver can transfer data to or from a set of GPIO I/O pins, and can logically connect an interrupt service routine (ISR) to a GPIO interrupt pin.
Your driver for the peripheral device can be a KMDF or user-mode driver framework (UMDF) driver.
Note If you intend to write a user-mode driver that runs on OneCoreUAP-based editions of Windows, it must use UMDF 2.0 programming interfaces. UMDF 1.0 drivers are not supported on those editions.
Describes how to design a GPIO controller driver that uses the GPIO framework extension. Additionally describes how the driver for a peripheral device can use GPIO pins to communicate with the device.
GPIO driver design guide (GPIO controller driver)
Programming interfaces for developing an GPIO controller
Describes the structures, methods, and event callback functions that are defined by the GPIO framework extension to support GPIO controller drivers. Additionally describes the GPIO-specific I/O control requests (IOCTLs) that peripheral device drivers use to communicate with devices that connect to GPIO pins.
Note These programming interfaces are included in OneCoreUAP-based editions of Windows.
Create a Universal Windows driver for GPIO peripheral device drivers
For step-by-step guidance, see Getting Started with Universal Windows drivers. Here is a summary of the steps:
Convert an existing GPIO driver to a universal driver
GPIO sample drivers contains a collection of these sample drivers:
Note Mobile and Universal Windows drivers do not support UMDF versions older than 2.0.