Difference between revisions of "AFE-E420 GPIO"
From ESS-WIKI
| Line 55: | Line 55: | ||
| 495 | | 495 | ||
|} | |} | ||
| − | |||
=== '''Enable GPIO''' === | === '''Enable GPIO''' === | ||
Latest revision as of 10:29, 13 June 2025
GPIO Pin Number Definition
| Pin Name | GPIO_Number |
| GPIO_A_0 | 480 |
| GPIO_A_1 | 481 |
| GPIO_A_2 | 482 |
| GPIO_A_3 | 483 |
| GPIO_A_4 | 484 |
| GPIO_A_5 | 485 |
| GPIO_A_6 | 486 |
| GPIO_A_7 | 487 |
| GPIO_B_0 | 488 |
| GPIO_B_1 | 489 |
| GPIO_B_2 | 490 |
| GPIO_B_3 | 491 |
| GPIO_B_4 | 492 |
| GPIO_B_5 | 493 |
| GPIO_B_6 | 494 |
| GPIO_B_7 | 495 |
Enable GPIO
# echo ${GPIO_Number} > /sys/class/gpio/export
GPIO Direction
Get GPIO direction.
# cat /sys/class/gpio/gpio${GPIO_Number}/direction
Set GPIO to input.
# echo in > /sys/class/gpio/gpio${GPIO_Number}/direction
Set GPIO to output.
# echo out > /sys/class/gpio/gpio${GPIO_Number}/direction
GPIO Level
Get GPIO level.
# cat /sys/class/gpio/gpio${GPIO_Number}/value
Set output to high.
# echo 1 > /sys/class/gpio/gpio${GPIO_Number}/value
Set output to low.
# echo 0 > /sys/class/gpio/gpio${GPIO_Number}/value

