![Phytec phyBoard Wega AM335x Скачать руководство пользователя страница 124](http://html1.mh-extra.com/html/phytec/phyboard-wega-am335x/phyboard-wega-am335x_application-manual_1554191124.webp)
phyBOARD-Wega AM335x [PB-00802-xxx]
108
©
PHYTEC Messtechnik GmbH 2014 L-792e_1
4.6.4.1.4
I
2
C Connectivity
Please refer to
section 4.6.2
2
C connectivity.
4.6.4.1.5
User programmable GPIOs
Eight pins of the expansion connector are dedicated as GPIO (
also available on the corresponding expansion-boards, e.g. PEB-EVAL-01. For more
information please look at the Expansion Boards Application Guide (L-793e).
The BSP delivered with the phyBOARD-Wega supports the GPIOs according
to the configuration done in correspondence to the expansion board
installed on delivery. Thus the GPIOs might not be available if they are
needed to support functions of the expansion board. In order to apply the
GPIOs for other purposes after removal of the expansion board the BSP
must be exchanged, too. This allows to easily adapt the BSP if an
expansion board is attached, removed, or exchanged, thus allowing to
release the GPIOs for other purposes.
With the appropriate BSP / BSP configuration the GPIOs (GPIO0_20, GPIO0_7, GPIO1_31,
GPIO3_7 and GPIO3_10) are available as input by default.
The following table lists all GPIOs, their location, their number and default usage.
Pin # GPIO Name
GPIOno
Default
Usage
31 GPIO3_9
105
LED3
out
33 GPIO3_10
106
IN
35 GPIO2_18
82
LED1
out
36 GPIO2_19
83
LED2
out
37 GPIO0_20
20
IN
38 GPIO0_7
7
IN
42 GPIO3_7
103
IN
44 GPIO1_31
63
IN
Table 22:
GPIOs available at Expansion Connector X69
To use the GPIOs switch to the appropriate directory by entering
cd
/sys/class/gpio
Then you must request the GPIO from the kernel and export the control to userspace by
typing
echo
GPIOno
>
export