FWA-2112 User Manual
10
For FWA-2112, pin mapping are defined as below:
2.
Control GPIOs.
“8” is smbus number and “0x23” is device address. “0x02” and “0x03” is offset, “0xff”
and other values are combined to control GPIO pin level.
1.3.2.3
Kernel GPIO sysfs to Control
The other interface to control LED from user space is by kernel GPIO sysfs. GPIO
sysfs also depends on i2c driver thus i2c_i801 must be loaded. It will use smbus
number and device address of IO expander located in previous chapter.
For more detail, please refer to kernel document:
https://www.kernel.org/doc/Documentation/gpio/sysfs.txt.
1.
Probe i2c and gpio_ich drivers.
Pin
LED Name
1
GPIO_0
2
GPIO_8
3
GPIO_1
4
GPIO_9
5
GPIO_2
6
GPIO_10
7
GPIO_3
8
GPIO_11
9
GPIO_4
10
GPIO_12
11
GPIO_5
12
GPIO_13
13
GPIO_6
14
GPIO_14
15
GPIO_7
16
GPIO_15
# sudo i2cset -y 8 0x23 0x02 0xff (GPIO0~7 high)
# sudo i2cset -y 8 0x23 0x03 0xff (GPIO8~15 high)
# sudo i2cset -y 8 0x23 0x02 0x00 (GPIO0~7 low)
# sudo i2cset -y 8 0x23 0x03 0x00 (GPIO8~15 low)
# sudo i2cset -y 8 0x23 0x02 0x01 (GPIO0 high, GPIO1~7 low)
# sudo i2cset -y 8 0x23 0x03 0x01 (GPIO8 high, GPIO9~15 low)
# sudo i2cset -y 8 0x23 0x02 0x02 (GPIO1 high, GPIO0 and GPIO2~7 low)
# sudo i2cset -y 8 0x23 0x03 0x02 (GPIO9 high, GPIO8 and GPIO10~15 low)
…
# sudo modprobe i2c_i801
# sudo modprobe gpio_ich
Содержание FWA-2112
Страница 1: ...User Manual FWA 2112 Network Security Platform ...
Страница 10: ...FWA 2112 User Manual x ...
Страница 11: ...Chapter 1 1 Linux Platform Software Guide Introduction ...
Страница 37: ...Appendix A A Glossary ...