Product specifications
53
Table 21 GPIO General Commands
Command
Description
SET GPIO DIR [IN|OUT] <gpio-num>
GPIO # = {1|2|3|4|5|6|7|8}
Sets GPIO signal to be an input or an output. The setting
only takes effect if the GPIO signal is not selected for special
function operation. <gpio-num> must be in the range 1-8.
NOTE: The direction bit configuration is not changed by a
configuration reset to default.
SHOW GPIO DIR
Shows current setting of the GPIO direction configuration.
Example:
Local> show gpio dir
GPIO Direction
--------------
1 [OUT]
2 [IN]
3 [IN]
4 [IN]
5 [SPCL]
6 [SPCL]
7 [SPCL]
8 [SPCL]
Local> set gpio dir in 1
Local> set gpio dir out 2
Local> show gpio dir
GPIO Direction
--------------
1 [IN]
2 [OUT]
3 [IN]
4 [IN]
5 [SPCL]
6 [SPCL]
7 [SPCL]
8 [SPCL]
SET GPIO DIRM <bit-mask>
GPIO # = {1|2|3|4|5|6|7|8}
Sets all direction control bits, where <bit-mask> is an 8 bit
mask expressed as 2 hex digits. This value should be in the
range 00-FF. The mask is encoded as follows:
7 6 5 4 3 2 1 0
GPIO8 GPIO7 GPIO6 GPIO5 GPIO4 GPIO3 GPIO2 GPIO1
A value of 1 sets the corresponding GPIO line to be an
output. A value of 0 sets the GPIO line to be an input. For
example, a hex value of 80 sets GPIO8 as an output, all
other GPIO signals are input.
NOTE: The direction bit configuration is not changed by a