S B C X U s e r ' s G u i d e
v . 1 . 0 . 1
gadget: high-speed config #1: Linux File-Backed Storage
5.13
GPIOs
i.MX6 can handle external pins in many different ways and most of them
can be configured as GPIOs. When a pin is set as a GPIO, it is possible
to read its value, change its direction or change output value directly from
the shell. The GPIOs can be easily accessed from sysfs: in the
/sys/class/gpio/ folder there are sub-folders, one for each
manageableGPIO. Each sub-folder contains files that indicate:
●
direction (in / out)
◾
The direction indicates wheter the PIN is listening, in, or ready to
send an output.
●
Value (0 / 1)
◾
The value, is just like a state. Where 0 means low, and 1 means high.
For further details about how to manage the GPIOs from sysfs, please
refer to the Linux kernel documentation at Documentation/gpio.txt.
5.13.1
Available GPIOs
The following table reports the signals available as GPIOs by default:
Connector.PIN
Pin Name
GPIO number
Sysfs mapping
J33.28
EIM_D26
GPIO3_IO26
gpio90
J33.30
EIM_D27
GPIO3_IO27
gpio91
J33.32
GPIO_17
GPIO7_IO12
gpio204
J33.34
GPIO_6/
I2C3_SDA
GPIO1_IO06
gpio6
5.13.2
Accessing the peripheral
If not already exported, the GPIO must be added to the list of exported
GPIOs:
echo XX > /sys/class/gpio/export
To read a GPIO direction:
cat /sys/class/gpio/gpioXX/direction
In or Out output is now expected To change the pin direction:
echo out > /sys/class/gpio/gpioXX/direction
or
December, 2019
56/139
Содержание SBC AXEL
Страница 2: ...S B C X U s e r s G u i d e v 1 0 1 Page intentionally left blank December 2019 2 139 ...
Страница 16: ...Fig 2 SBCX block diagram S B C X U s e r s G u i d e v 1 0 1 2 2 Block Diagram December 2019 16 139 ...
Страница 18: ...Fig 3 Assembly view top S B C X U s e r s G u i d e v 1 0 1 2 4 Assembly view top December 2019 18 139 ...
Страница 19: ...Fig 4 Assembly view bottom S B C X U s e r s G u i d e v 1 0 1 2 5 Assembly view bottom December 2019 19 139 ...
Страница 23: ...S B C X U s e r s G u i d e v 1 0 1 3 1 2 Drills position and size December 2019 23 139 Fig 6 SBCX drills ...
Страница 105: ...S B C X U s e r s G u i d e v 1 0 1 December 2019 105 139 ...
Страница 106: ...S B C X U s e r s G u i d e v 1 0 1 December 2019 106 139 ...
Страница 107: ...S B C X U s e r s G u i d e v 1 0 1 December 2019 107 139 Fig 44 QtQuick Hello World ...
Страница 119: ...S B C X U s e r s G u i d e v 1 0 1 December 2019 119 139 ...
Страница 121: ...S B C X U s e r s G u i d e v 1 0 1 December 2019 121 139 ...
Страница 139: ...S B C X U s e r s G u i d e v 1 0 1 December 2019 139 139 ...