(1)若gpio11设置为输入,将io口和地短接,可以监测到电平变化
root@myzr /sys/class/gpio/gpio11$ ls
active_low direction edge power subsystem uevent value
root@myzr /sys/class/gpio/gpio11$ cat value
1
root@myzr /sys/class/gpio/gpio11$ cat value
1
root@myzr /sys/class/gpio/gpio11$ cat value
0
root@myzr /sys/class/gpio/gpio11$ cat value
1
root@myzr /sys/class/gpio/gpio11$ cat value
1
root@myzr /sys/class/gpio/gpio11$ cat value
1
root@myzr /sys/class/gpio/gpio11$ cat value
1
root@myzr /sys/class/gpio/gpio11$ cat value
0
root@myzr /sys/class/gpio/gpio11$ cat value
0
root@myzr /sys/class/gpio/gpio11$ cat value
0
root@myzr /sys/class/gpio/gpio11$ cat value
1
(2)若gpio11设置为输出,将io口输出低,万用表测试却始终为高
root@myzr /sys/class/gpio/gpio11$ echo out > ./direction
root@myzr /sys/class/gpio/gpio11$ ls
active_low direction edge power subsystem uevent value
root@myzr /sys/class/gpio/gpio11$ cat direction
out
root@myzr /sys/class/gpio/gpio11$ echo 0 > ./value