GPIO
gpio.alias
Abbreviation
     
      gp a
     
    
Access
     
      get/set
     
    
Description
     A GPIO alias name between 1-15 characters. GPIO name aliasing avoids the need to remember which GPIO is connected where. You can give the GPIO a recognisable name instead! Retrieve aliases with
     
      get gp a all
     
     . Remove an alias by setting to an empty double quoted string ("").
    
Arguments
     
      <all> / <GPIO#> <alias name>
     
    
Default
     
     
    
Properties
- takes effect immediately
 
Gecko OS Kernel Plugin
Get example
> get gp a 6
R000008
MyGPIO
    Set example
> set gp a 6 FrontDoor
R000008
Set OK
    {*
gpio.init
Abbreviation
     
      gp i
     
    
Access
     
      get/set
     
    
Description
     The initial direction and value of a GPIO after bootup/reset. Use the
     
      all
     
     option to retrieve a list of GPIOs and their current initialization settings.
    
Arguments
     
      <all> / <GPIO#> <direction> <initial value>
     
    
Default
     
      <none>
     
     for unassigned GPIOs
    
Properties
Gecko OS Kernel Plugin
Get example
> get gp i 0
R000021
output_open_drain 1
    Set example
> set gp i 0 out 1
R000008
Set OK
    gpio.sleep
Abbreviation
     
      gp s
     
    
Access
     
      get/set
     
    
Description
Set the state of the specified GPIO when sleeping.
GPIOs are initialized is as follows:
- On startup, all unused pins (i.e. MCU pins not assigned a module GPIO) are set to the default state for the MCU
 - Then module GPIOs are set to either their gpio.init value if specified, else the MCU default state
 
Arguments
     
      <all> / <GPIO#> <state>
     
     where state is one of the following:
    
| State | Description | 
|---|---|
        
         default
        
        | 
       factory default state | 
        
         input_highz
        
        | 
       input high impedance | 
        
         input_pull_down
        
        | 
       input pull down | 
        
         input_pull_up
        
        | 
       input pull up | 
        
         output_high
        
        | 
       output high | 
        
         output_low
        
        | 
       output low | 
Default
     
      default
     
    
Properties
Gecko OS Kernel Plugin
Get example
> get gp s 0
input_pull_up
    Set example
> set gp s 0 output_low
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>
     
    
Gecko OS Kernel Plugin
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