GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GPIOCTL(8) FreeBSD System Manager's Manual GPIOCTL(8)

gpioctl
GPIO control utility

gpioctl [-f ctldev] -l [-v]

gpioctl [-f ctldev] [-pN] -t pin

gpioctl [-f ctldev] [-pN] -c pin flag [flag ...]

gpioctl [-f ctldev] [-pN] -n pin pin-name

gpioctl [-f ctldev] [-pN] pin [0|1]

The gpioctl utility could be used to manage GPIO pins from userland and list available pins.

The pin argument can either be a pin-number or a pin-name. If it is a number and a pin has this number as its name and you did not use -N or -p , then gpioctl exits.

The options are as follows:

pin flag [flag ...]
Configure pin by setting provided flags. The following flags are currently defined:
Input pin
Output pin
Open drain pin
Push pull pin
Tristate pin
Pull-up pin
Pull-down pin
Inverted input pin
Inverted output pin
ctldev
GPIO controller device to use If not specified, defaults to /dev/gpioc0
list available pins
pin pin-name
set the name used to describe the pin
pin
toggle value of provided pin
be verbose: for each listed pin print current configuration
Force pin to be interpreted as a pin number
Force pin to be interpreted as a pin name

  • List pins available on GPIO controller defined by device /dev/gpioc0

    gpioctl -f /dev/gpioc0 -l

  • Set the value of pin 12 to 1

    gpioctl -f /dev/gpioc0 12 1

  • Configure pin 12 to be input pin

    gpioctl -f /dev/gpioc0 -c 12 IN

  • Set the name of pin 12 to test

    gpioctl -f /dev/gpioc0 -n 12 test

  • Toggle the value the pin named test

    gpioctl -f /dev/gpioc0 -t test

  • Toggle the value of pin number 12 even if another pin has the name 12

    gpioctl -f /dev/gpioc0 -pt 12

gpio(4), gpioiic(4), gpioled(4)

The gpioctl utility appeared in FreeBSD 9.0.

The gpioctl utility and this manual page were written by Oleksandr Tymoshenko <gonzo@freebsd.org>.
June 6, 2018 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 8 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.