Aria Rockchip RK3308 GPIO Control

From Ariaboard Wiki
Jump to navigation Jump to search

Control GPIO via Shell

To control GPIO3_A5, we need to control on gpio101 (32*3+0*8+5 = 101)

  • [A->0]
  • [B->1]
  • [C->2]
  • [D->3]

export gpio

# echo 101 > /sys/class/gpio/export #export the pin
# echo out > /sys/class/gpio/gpio101/direction #set direction, out or in

on and off

# echo 1 > /sys/class/gpio/gpio101/value #on
# echo 0 > /sys/class/gpio/gpio101/value #off