VAB
VAB
VAB
VAB----800 Android BSP 1.
800 Android BSP 1.
800 Android BSP 1.
800 Android BSP 1.3
3
3
3 User Manual
User Manual
User Manual
User Manual
23
3.3.8.
GPIO
•
Change directory to /sys/class/gpio
/sys/class/gpio
/sys/class/gpio
/sys/class/gpio
•
Generate the numbers corresponding to the GPIO pins.
P
PP
Pin
in
in
in
VAB
VAB
VAB
VAB----800 name
800 name
800 name
800 name
FSL name
FSL name
FSL name
FSL name
C7
GPI_2
GPIO1_2
C6
GPI_16
GPIO7_11
D7
GPI_18
GPIO7_13
B4
GPI_19
GPIO4_5
E14
GPI_10
GPIO1_10
C15
GPI_11
GPIO1_11
E13
GPI_12
GPIO1_12
D14
GPI_13
GPIO1_13
Table
Table
Table
Table 2
2
2
2:
:
:
: GPIO pins
GPIO pins
GPIO pins
GPIO pins
The number is (X-1)*32+Y for each GPIOX_Y.
Ex: The number for GPIO7_11 is (7-1)*32+11=203
The number for GPIO1_11 is (1-1)*32+11=11
echo 203 > export
echo 11 > export
The directories “gpio203” and “gpio11” will be created under /sys/class/gpio/
•
Set GPIO IN/OUT
echo in > gpio203/direction
echo out > gpio11/direction
Note
Note
Note
Note::::
10, 11, 12, and 13 are out. 2, 203, 205 and 101 are in.
•
Test
The following GPIO are connected by jumpers, we can test them together.
gpio101 --- gpio13
gpio205 --- gpio12
gpio203 --- gpio11
gpio2 --- gpio10
Write value 0 or 1 to “out” and read value from “in”
echo 0 > /sys/class/gpio/gpio203/value
cat /sys/class/gpio/gpio11/value
Check if the value is the same as you wrote it.
Summary of Contents for VAB-800
Page 1: ...1 30 02122015 170700 USER MANUAL VAB 800 Android BSP 1 3...
Page 41: ......