
ROM-5420 User Manual 12
3.1.5 GPIO Test
3.1.5.1 ROM-5420 GPIO Default Setting
* GPIO1 & GPIO3 has been reserved for camera input in ROM-5420. You can use
the two GPIO ports if you do not need the camera feature.
#cd /sys/class/gpio
You can use “ls” to list all GPIO devices, and you should also see GPIO ports in
above table.
3.1.5.2 Example of Testing GPIO
A. Set gpio177 GPI (in)
#echo in > ./gpio177/direction
#cat ./gpio177/direction
in
B. Set gpio178 GPO (out)
#echo out > ./gpio178/direction
#cat ./gpio178/direction
out
C. Set gpio177 GPO value “0”
#echo 0 > ./gpio177/value
D. Get gpio178 value
Note! Please make sure parameter “seek” is equal to 25118 as indicated in
red in above codes. If you create the file to a wrong sector, that may
damage the system.
ROM-DB5900
Linux OS
/sys/class/gpio
Jumper Setting
in ROM-DB5900
GPIO0 gpio1 CN24(1-2)
*GPIO1 - CN26(2-3)CAM1_PWR#
GPIO2 gpio4 CN27(1-2)
*GPIO3 - CN28(2-3)CAM1_RST#
GPIO4 gpio205 CN30(1-2)
GPIO5 gpio21 CN31(1-2)
GPIO6 gpio198 CN32(1-2)
GPIO7 gpio199 CN35(1-2)
GPIO8 gpio193 CN34(1-2)
GPIO9 gpio192 CN26(1-2)
GPIO10 gpio178
GPIO11 gpio177
Commentaires sur ces manuels