![Eurotech ReliaGATE 10-14 Series Скачать руководство пользователя страница 63](http://html1.mh-extra.com/html/eurotech/reliagate-10-14-series/reliagate-10-14-series_user-manual_2440372063.webp)
ReliaGATE 10-14 User manual Rev. 0-10
12 How to use the interfaces in Linux
12
H
OW TO USE THE INTERFACES IN
L
INUX
Interface availability depends on product version.
12.1
General Purpose IO
The ReliaGATE 10-14 offers a number of general purpose IO lines (GPIOs): some provide additional
support for other interfaces such as expansion connector power supply control etc, while others provide
functionality such as the opto-isolated IO channels, and user LEDs etc which are available for use in
application programs.
These GPIO lines are controlled using the
sysfs
filesystem which associates filenames with the various
GPIO line functions. The GPIO lines are represented by the following directories:
/sys/class/gpio/gpioxxx
where xxx is the number of the associated GPIO line.
Filename
Functions
value
Get or set the value of the GPIO line (can be “0” or “1”)
direction
Get or set the direction (can be “in” or “out”)
active_low
Inverts the GPIO, when set to 1 writing 1 to value sets the GPIO pin to a low voltage level. (can be “0” or “1”)
To read and write to the GPIO line from the command line, use the “cat” and “echo” utilities and
enter the following commands:
echo 1 >/sys/class/gpio/gpio108/value
cat /sys/class/gpio/gpio108/value
NOTICE
Appropriate values for
direction
and
active_low
are set during system initialization for each
GPIO and should not require further alteration.
For details of the other files and subdirectories consult the Linux documentation at:
https://www.kernel.org/doc/Documentation/gpio/sysfs.txt
63 / 90
Содержание ReliaGATE 10-14 Series
Страница 4: ...This page has been intentionally left blank...
Страница 12: ...This page has been intentionally left blank...
Страница 16: ...This page has been intentionally left blank...
Страница 18: ...This page has been intentionally left blank...
Страница 20: ...This page has been intentionally left blank...
Страница 22: ...This page has been intentionally left blank...
Страница 28: ...This page has been intentionally left blank...
Страница 36: ...This page has been intentionally left blank...
Страница 80: ...This page has been intentionally left blank...
Страница 86: ...This page has been intentionally left blank...
Страница 88: ...This page has been intentionally left blank...
Страница 89: ...ReliaGATE 10 14 User manual Rev 0 10 Notes NOTES 89 90...