GPIO Overview
Introduction
GPIO is short for general-purpose input/output. Generally, a GPIO controller manages all GPIO pins by group. Each group of GPIO pins is associated with one or more registers. The GPIO pins are operated by reading data from and writing data to the registers.
The GPIO APIs define a set of standard functions for performing operations on GPIO pins, including:
-
Setting the pin direction, which can be input or output (High impedance is not supported currently.)
-
Reading and writing level values, which can be low or high
-
Setting an interrupt service routine (ISR) function and interrupt trigger mode for a pin
-
Enabling or disabling a pin interrupt
Available APIs
Table 1 APIs available for the GPIO driver
NOTE: All functions provided in this document can be called only in kernel mode.