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
Supported Platforms
- AMW007
- AMW037
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>
Supported Platforms
- AMW007
- AMW037
Get example
> get gp u
! # Description
# 0 GPIO in
# 1 system.indicator.softap
# 4 system.indicator.network
# 5 GPIO in