If you have the libgpiod tools installed (sudo apt install gpiod
) then you can look at the GPIO status using gpioinfo
. For example:
# List gpio devices
gpiodetect
# Show APQ GPIO status
gpioinfo 1000000.pinctrl
# Show PM GPIO status (counting starts from 1 in the hardware manual
# so subtract 1 for PM GPIO numbers
gpioinfo 200f000.spmi:pm8916@0:gpios@c00
# Show MPP GPIO status (subtract 1 for MPP GPIO numbers too)
gpioinfo 200f000.spmi:pm8916@0:gpios@c00
You can also use the libgpiod to manipulate the GPIO status from shell (gpiod tools) or C (libgpiod).
PS You can also use MRAA as a wrapper library instead: MRAA Library for 96Boards - 96Boards