Advantech EPC-R4710 User Manual page 27

Rockchip arm cortex-a72 box computer
Table of Contents

Advertisement

Set GPIO value 0/1 if GPIO pin define is output.
$ echo 1 > /sys/class/gpio/gpio72/value
Used as IRQ signal.
Note: You have to configure GPIO to input.
$ echo "rising" > /sys/class/gpio/gpio72/edge
NOTE: rising: Trigger on rising edge
falling: Trigger on falling edge
both: Trigger on both edges
none: Disable interrupt on both edges
Unexport GPIO1.
$ echo 72 > /sys/class/gpio/unexport
GPIO 1 and GPIO 2 are taken as an example:
Connect GPIO 1 and GPIO 2.
Export GPIO 1 and GPIO 2.
$ echo 72 > /sys/class/gpio/export
$ echo 50 > /sys/class/gpio/export
Set GPIO 1 to output.
$ echo "out" > /sys/class/gpio/gpio72/direction
Set GPIO 2 to input.
$ echo "in" > /sys/class/gpio/gpio50/direction
Change GPIO 1 to 1 and read GPIO 2 value.
$ echo 1 > /sys/class/gpio/gpio72/value
$ cat /sys/class/gpio/gpio50/value
1
Change GPIO 1 to 0 and read GPIO 2 value.
echo 0 > /sys/class/gpio/gpio72/value
$ cat /sys/class/gpio/gpio50/value
0
21
EPC-R4710 User Manual

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the EPC-R4710 and is the answer not in the manual?

Table of Contents