![Lightware RAP-B511-EU Скачать руководство пользователя страница 100](http://html.mh-extra.com/html/lightware/rap-b511-eu/rap-b511-eu_user-manual_1915314100.webp)
7. LW3 Programmers’ Reference
RAP-B511 series
– User's Manual
100
Applied firmware package: v1.1.0b3b3 | LDC software: v2.5.1b5
7.22. GPIO Port Configuration
7.22.1.
Set the Direction of a GPIO Pin
Command and Response
ç
SET·/MEDIA/GPIO/
<gpio_port>
.Direction=
<dir>
æ
pw·/MEDIA/GPIO/
<gpio_port>
.Direction=
<dir>
Parameters
<dir>
I
: input direction of the GPIO pin
O
: output direction of the GPIO pin
Example
ç
SET /MEDIA/GPIO/P1.Direction=I
æ
pw /MEDIA/GPIO/P1.Direction=I
7.22.2.
Set the Output Level of a GPIO Pin
Command and Response
ç
SET·/MEDIA/GPIO/
<gpio_port>
.Output=
<value>
æ
pw·/MEDIA/GPIO/
<gpio_port>
.Output=
<value>
Parameters
Identifier
Parameter description
Parameter values
<gpio_port>
GPIO port number
P1-P3
<value>
Value of the GPIO pin
H
: High level
L
:
Low level
Example
ç
SET /MEDIA/GPIO/P1.Output=H
æ
pw /MEDIA/GPIO/P1.Output=H
7.22.3.
Toggle the Level of a GPIO Pin
It toggles between the high and low level of the chosen output port.
Command and Response
ç
CALL·/MEDIA/GPIO/
<gpio_port>
:toggle()
æ
pw·/MEDIA/GPIO/
<gpio_port>
:toggle
Example
ç
CALL
/MEDIA/GPIO/P1:toggle()
æ
mO
/MEDIA/GPIO/P1:toggle