Scroll to navigation

GPIOSET(1) User Commands GPIOSET(1)

NAME

gpioset - manual page for gpioset v1.6.2

SYNOPSIS

gpioset [OPTIONS] <chip name/number> <offset1>=<value1> <offset2>=<value2> ...

DESCRIPTION

Set GPIO line values of a GPIO chip and maintain the state until the process exits

OPTIONS

display this message and exit
display the version and exit
set the line active state to low

-B, --bias=[as-is|disable|pull-down|pull-up] (defaults to 'as-is'):

set the line bias

-D, --drive=[push-pull|open-drain|open-source] (defaults to 'push-pull'):

set the line drive mode

-m, --mode=[exit|wait|time|signal] (defaults to 'exit'):

tell the program what to do after setting values
specify the number of seconds to wait (only valid for --mode=time)
specify the number of microseconds to wait (only valid for --mode=time)
after setting values: detach from the controlling terminal

Biases:

leave bias unchanged
disable bias
enable pull-up
enable pull-down

Drives:

drive the line both high and low
drive the line low or go high impedance
drive the line high or go high impedance

Modes:

set values and exit immediately
set values and wait for user to press ENTER
set values and sleep for a specified amount of time
set values and wait for SIGINT or SIGTERM

Note: the state of a GPIO line controlled over the character device reverts to default when the last process referencing the file descriptor representing the device file exits. This means that it's wrong to run gpioset, have it exit and expect the line to continue being driven high or low. It may happen if given pin is floating but it must be interpreted as undefined behavior.

AUTHOR

Bartosz Golaszewski <bartekgola@gmail.com>

REPORTING BUGS

Report bugs to:
Bartosz Golaszewski <bartekgola@gmail.com>
linux-gpio <linux-gpio@vger.kernel.org>

COPYRIGHT

Copyright © 2017-2018 Bartosz Golaszewski License: LGPLv2.1
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

December 2020 libgpiod v1.6.2