Operate GPIO, set to read input or output specified value:
cd /sys/class/gpio/gpio486# set input modeecho in > directioncat value# set output modeecho out > direction# output low levelecho 0 > value# output high levelecho 1 > value
There are a few things to note:
If the GPIO has been applied by other drivers, it cannot be exported successfully, and subsequent read and write operations cannot be performed.
Involving the multiplexing of IO functions, if the function of the pin is already GPIO, the above method can be used; otherwise, the pinctrl state must be specified in the device tree.