Project

General

Profile

Actions

How to verify GPIO function

Here is some command to verify GPIO151 can control via 40Pins IO.
  • Set as GPIO mode
    echo "mode 151 0" > /sys/devices/platform/1000b000.pinctrl/mt_gpio 
    
  • Set as output mode
    echo "dir 151 1" > /sys/devices/platform/1000b000.pinctrl/mt_gpio
    
  • Set output high
    echo "out 151 1" > /sys/devices/platform/1000b000.pinctrl/mt_gpio
    
  • Set output low
    echo "out 151 0" > /sys/devices/platform/1000b000.pinctrl/mt_gpio
    

Updated by Lion Wang about 3 years ago · 1 revisions