summaryrefslogtreecommitdiffstats
path: root/usr.sbin/gpioctl/gpioctl.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bzero -> memset. No binary change.mmcc2015-12-261-8/+8
| | | | ok tb@
* - sync usage() and SYNOPSISjmc2011-10-041-2/+2
| | | | | | | - document "flag", for I2C devices - "pin" is not optional ok matthieu
* Add a 'flag' locator to gpioiic(4), and define a first flagmatthieu2011-10-031-11/+19
| | | | | | value to swap the SDA and SCL pins assigment during attach. Mostly from work with mbalmer@NetBSD. ok miod@
* delete unused prototype, from lint; ok mbalmer@stevesk2008-12-031-2/+1
|
* Fix output.mbalmer2008-11-301-2/+2
|
* Allow the words "on", "off", or "toggle" to be used instead of thembalmer2008-11-291-7/+16
| | | | numerical values when writing to a pin; fix an error message.
* Reorder variables, add my copyright.mbalmer2008-11-261-8/+6
|
* Use the new gpio(4) semantics and change the command line syntax to ambalmer2008-11-261-105/+151
| | | | | | | | | | | more readable and straightforward format. Note that there is no longer a default GPIO device, but it has to be sepcified on the command line always (and as Theo mentioned, newfs also does not default to /dev/sd0a...) You must do a 'make includesi' in /usr/src before building this command or before your next system build. ok uwe@
* - tweak previousjmc2008-11-241-3/+3
| | | | - kill .Tn
* Add and document -A and -D options to attach or detach devices atmbalmer2008-11-241-4/+68
| | | | | | runtime to a gpio bus. ok uwe, drahn
* GPIO pins can be programmed to invert input or output on some devices.mbalmer2007-11-171-1/+3
| | | | | | Introduce new flags, GPIO_PIN_INVIN and GPIO_PIN_INVOUT, for this. ok grange
* pull-down (GPIO_PIN_PULLDOWN) is a valid flags for some GPIO devices,mbalmer2007-11-171-1/+2
| | | | | | e.g. the AMD Geode C5536 GPIO. ok grange
* use strtonum() to avoid out of range values, way simpler than thederaadt2007-03-181-6/+7
| | | | 12-line song and dance that standard functions need; bret.lambert@gmail
* Unbreak; noticed by evol@online.ptt.ru.grange2005-11-171-2/+2
|
* no need for -h, any illegal option is finederaadt2005-11-161-6/+4
|
* spacingderaadt2004-08-081-4/+4
|
* gpioctl -- program to control GPIO devices.grange2004-06-031-0/+231
The gpioctl program allows to manipulate GPIO devices pins Quick start for the Soekris net4801 users: # gpioctl -c 20 out pp # gpioctl 20 1 This will turn on the red error led. If you want to use JP5 I/O pins, just use the /dev/gpio1 device. Quick start for the PC Engines WRAP.1C users: # gpioctl 40 This will read the state of the button (0 means pressed). # gpioctl -c 2 pp out This will turn the first led on, to turn off write 1 to the pin, it's reversed. For the second and the third leds use pins 3 and 18. ok deraadt@