GPIO

gpio.init

Abbreviation

gp i

Access

get/set

Description

The initial direction and value of a GPIO after bootup/reset. Retrieve a list of GPIOs that will be initialized with the all option.

Arguments

<all> / <GPIO#> <direction> <initial value>

Default

<none> for unassigned GPIOs

Properties

Get example

> get gp i 0
R000021
output_open_drain 1

Set example

> set gp i 0 out 1
R000008
Set OK

gpio.usage

Abbreviation

gp u

Access

get

Description

Returns information about which GPIOs have been registered for functions, and which have standard I/O options set. GPIOs may be de-registered by setting the GPIO to -1 using the appropriate variable. e.g. set ioconn.status_gpio -1. See Peripherals.

Arguments

-

Default

<platform dependent>

Get example

> get  gp u
!  # Description
#  0 GPIO in
#  1 system.indicator.wlan
#  2 system.indicator.network
#  5 system.indicator.softap
# 11 setup.control_gpio
# 13 UART1 RX
# 14 UART1 TX
# 17 SPI0 CLK
# 18 SPI0 MOSI
# 19 SPI0 MISO
# 21 GPIO out
# 22 GPIO out