调试
先查看有没有/sys/devices/virtual/misc/mtgpio/pin,如果有,则尝试以下命令
echo -wmode 48 0 > /sys/devices/virtual/misc/mtgpio/pin
echo -wdir 48 1 > /sys/devices/virtual/misc/mtgpio/pin
echo -wdout 48 1 > /sys/devices/virtual/misc/mtgpio/pin
在修改GPIO48后,通过cat /sys/devices/virtual/misc/mtgpio/pin 查看这个pin的改变
如果没有/sys/devices/virtual/misc/mtgpio/pin,则尝试以下方式:
gpio debug cmd有变化,请参考以下方式:
1. cmd to change func/mode of pins,
echo mode [pin] [func] > mt_gpio
eg:
# echo mode 1 1 > mt_gpio
# cat mt_gpio
PIN: [MODE] [DIR] [DOUT] [DIN] [PULL_EN] [PULL_SEL] [IES] [SMT] [DRIVE] ( [R1] [R0] )
0: 0 0 0 0 1 0 1 0 0
1: 1 0 0 1 1 1 1 0 0
2. cmd to change direction of pins,
echo dir [pin] [dir] > mt_gpio /*dir: 0(input) 1(output)*/
eg:
# echo dir 1 1 > mt_gpio
# cat