21
EPC-R4680 User Manual
Chapter 3
S
oftware
Functionality
Used as IRQ signal
Note: You have to configure GPIO to input
Unexport GPIO0
GPIO 219 and GPIO 220 are taken as an example:
Connect GPIO 219 and GPIO 220
Export GPIO 219 and GPIO 220
Set GPIO 219 to output
Set GPIO 220 to input
Change GPIO 219 to 1 and read GPIO 220 value
Change GPIO 219 to 0 and read GPIO 220 value
shell@rsb4680:/ $ echo "rising" > /sys/class/gpio/gpio219/edge
NOTE:
rising: Trigger on rising edge
falling: Trigger on falling edge
both: Trigger on both edges
none: Disable interrupt on both edges
shell@rsb4680:/ $ echo 219 > /sys/class/gpio/unexport
shell@rsb4680:/ $ echo 219 > /sys/class/gpio/export
shell@rsb4680:/ $ echo 220 > /sys/class/gpio/export
shell@rsb4680:/ $ echo "out" > /sys/class/gpio/gpio219/direction
shell@rsb4680:/ $ echo "in" > /sys/class/gpio/gpio220/direction
shell@rsb4680:/ $ echo 1 > /sys/class/gpio/gpio219/value
shell@rsb4680:/ $ cat /sys/class/gpio/gpio220/value
1
shell@rsb4680:/ $ echo 0 > /sys/class/gpio/gpio219/value
shell@rsb4680:/ $ cat /sys/class/gpio/gpio220/value
0
Summary of Contents for EPC-R4680
Page 6: ...EPC R4680 User Manual vi ...
Page 12: ...EPC R4680 User Manual 4 ...
Page 33: ...25 EPC R4680 User Manual Chapter 3 Software Functionality 3 7 USB DISK 3 7 1 USB Disk Status ...
Page 34: ...EPC R4680 User Manual 26 ...
Page 41: ...33 EPC R4680 User Manual Chapter 3 Software Functionality ...
Page 42: ...EPC R4680 User Manual 34 ...