17
RSB-3710 User Manual
C
ha
pte
r 3
So
ftw
are
F
un
ctio
na
lity
Set GPIO value 0/1 if GPIO pin define is output.
Unexport GPIO1.
GPIO 1 and GPIO 2 are taken as an example:
Connect GPIO 1 and GPIO 2
Export GPIO 1 and GPIO 2
Set GPIO 1 to output.
Set GPIO 2 to input.
Change GPIO 1 to 1 and read GPIO 2 value.
Change GPIO 1 to 0 and read GPIO 2 value.
3.4
UART
The Android/Linux UART/serial port access from user is through the tty-devices. The
tty-devices have different names depending on UART driver on different boards.
RS-485 uses half-duplex communication, which means that one medium is shared
for transmitting and receiving data. Therefore the system needs to control the RS-
485 transceiver's transmit mode. Usually the UART RTS signal is used to switch the
transmitter on and off.
$ echo 1 > /sys/class/gpio/gpio504/value
$ echo 504 > /sys/class/gpio/unexport
$ echo 504 > /sys/class/gpio/export
$ echo 505 > /sys/class/gpio/export
$ echo "out" > /sys/class/gpio/gpio504/direction
$ echo "in" > /sys/class/gpio/gpio505/direction
$ echo 1 > /sys/class/gpio/gpio504/value
$ cat /sys/class/gpio/gpio505/value
1
echo 0 > /sys/class/gpio/gpio504/value
$ cat /sys/class/gpio/gpio505/value
0
Summary of Contents for EPC-R3710NO-XAA100
Page 1: ...User Manual EPC R3710 Rockchip Arm Cortex A72 BOX Computer ...
Page 6: ...EPC R3710 User Manual vi ...
Page 8: ...EPC R3710 User Manual viii 4 3 2 Repair Process 32 ...
Page 14: ...EPC R3710 User Manual 6 ...
Page 20: ...EPC R3710 User Manual 12 ...
Page 43: ...35 EPC R3710 User Manual Chapter 4 Advantech Services ...