Gpio Test - Advantech RSB-4221 User Manual

Risc 3.5inch sbc based on ti sitara am3358 cortex a8 1ghz high performance processor
Hide thumbs Also See for RSB-4221:
Table of Contents

Advertisement

3.6

GPIO Test

RSB-4221 GPIO default setting.
RSB-4221
GPIO0
GPIO1
GPIO2
GPIO3
GPIO4
GPIO5
GPIO6
GPIO7
GPIO8
GPIO9
GPIO10
GPIO11
#cd /sys/class/gpio
You can use "ls" to list all GPIO devices, and you should also see GPIO ports in
above table.
Example of testing GPIO
Set gpio200GPI(in)
#echo in > ./gpio200/direction
#cat ./gpio200/direction
in
Set gpio201 GPO (out)
#echo out > ./gpio201/direction
#cat ./gpio201/direction
out
Set gpio201 GPOvalue "1"
#echo 1> ./gpio201/value
#echo 1> ./gpio201/value
Get gpio200 value
#cat ./gpio200/value
1
As you can see in above procedure A and B, we set gpio200 as GPI and gpio 201 as
GPO, once we send data out from gpio 201, it should be able to receive the same
data from gpio200.
RSB-4221 User Manual
Android OS/sys/class/gpio
gpio200
gpio201
gpio202
gpio203
gpio204
gpio205
gpio206
gpio207
gpio208
gpio209
gpio2010
gpio2011
30

Advertisement

Table of Contents
loading

Table of Contents