EPC-R5710 GPIO
From ESS-WIKI
Revision as of 09:18, 7 September 2023 by Xingxing.li (talk | contribs)
GPIO Pin
Pin | Numbers |
GPIO1 | 43 |
GPIO2 | 42 |
GPIO3 | 475 |
GPIO4 | 474 |
GPIO5 | 472 |
Generate the path node number of the corresponding gpioX, increasing with the export orde.
GPIO Loopback Test (Using GPIO1 and GPIO2 as examples)
Step 1: Connect GPIO1 and GPIO2
Step 2: Export GPIO interface
# echo 43 > /sys/class/gpio/export # echo 42 > /sys/class/gpio/export # echo out > /sys/class/gpio/gpio1/direction # echo in > /sys/class/gpio/gpio2/direction # cat /sys/class/gpio/gpio2/value 0# echo 1 > /sys/class/gpio/gpio1/value # cat /sys/class/gpio/gpio2/value 1