Project

General

Profile

How to verify GPIO function » History » Version 1

Lion Wang, 11/16/2021 10:01 AM

1 1 Lion Wang
h1. How to verify GPIO function
2
3
Here is some command to verify GPIO151 can control via 40Pins IO.
4
* Set as GPIO mode
5
<pre>
6
echo "mode 151 0" > /sys/devices/platform/1000b000.pinctrl/mt_gpio 
7
</pre>
8
* Set as output mode
9
<pre>
10
echo "dir 151 1" > /sys/devices/platform/1000b000.pinctrl/mt_gpio
11
</pre>
12
* Set output high
13
<pre>
14
echo "out 151 1" > /sys/devices/platform/1000b000.pinctrl/mt_gpio
15
</pre>
16
* Set output low
17
<pre>
18
echo "out 151 0" > /sys/devices/platform/1000b000.pinctrl/mt_gpio
19
</pre>