Application commands
Digi TransPort User Guide
145
gpio command: General Purpose Input Output (GPIO)
GPIO commands are necessary to configure a WR44, which has one Digital Input/Output port
and one Digital Input port. This command allows configuration of the I/O port either as an input
port or an output port. For example:
The syntax of the command is as follows:
gpio [inout ON|OFF|input|output]
Display current status of ports
With no parameters, the
gpio
command displays the current status of the ports. For example:
gpio
Input(s):
in : OFF
Output(s):
inout : OFF
OK
Set the I/O port as an output
To set the I/O port to be an output:
gpio inout output
Input(s):
in : OFF
Output(s):
inout : OFF
OK
Set the I/O port to ON when configured as an output
To set the I/O port to
ON
when it is configured as an output:
gpio inout on
Input(s):
in : OFF
Output(s):
inout : ON
OK
Command
Description
gpio inout input
Configures the I/O port as an input.
gpio inout output
Configures the I/O port as an output.
gpio inout ON
Sets the I/O port to ON when configured as an output.
gpio inout OFF
Sets the I/O port to OFF when configured as an output.