How To Access Interfaces Under Linux; How To Drive The Gpios: The Gpio Utility - Eurotech DynaGate 10-12 Series User Manual

Automobile iot edge gateway ti am335x, lte cat 1
Table of Contents

Advertisement

DynaGATE 10-12 User manual Rev. 0-14
11
H
OW TO ACCESS INTERFACES UNDER
Interfaces availability depends on the product version.
NOTICE
If Everyware Software Framework (ESF) is installed, it will manage the network interfaces,
mobile modem, Bluetooth adapter and GPIOs.
Any changes you make to the Linux configuration files may be overwritten if the related service
is managed by ESF.
Refer to the ESF documentation for further details.
11.1

How to drive the GPIOs: the GPIO utility

Several DynaGATE 10-12 interfaces are controlled by their GPIO. To manage these interfaces, you will
need to control the relevant GPIO pin.
To drive a GPIO, use the GPIO utility: gpio_utility.
gpio_utility allows you to:
Read / Write a GPIO status
l
Set a GPIO as input or output
l
Unexport a GPIO.
l
The GPIOs are exported by default at startup.
To read the GPIO status (for example: the status of LED 1), enter the following command:
gpio_utility gpio117
The output is the following:
If LED 1 is ON, then gpio117 = 1
l
If LED 1 is OFF, then gpio117 = 0
l
To set the GPIO status (for example: the status of LED 1), enter the following commands:
#turn led on
gpio_utility gpio117 1
#turn led off
gpio_utility gpio117 0

11 How to access interfaces under Linux

L
INUX
63 / 94

Advertisement

Table of Contents
loading

Table of Contents