History log of /openbsd-current/usr.sbin/gpioctl/gpioctl.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.17 26-Dec-2015 mmcc

bzero -> memset. No binary change.

ok tb@


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.16 04-Oct-2011 jmc

- sync usage() and SYNOPSIS
- document "flag", for I2C devices
- "pin" is not optional

ok matthieu


# 1.15 03-Oct-2011 matthieu

Add a 'flag' locator to gpioiic(4), and define a first flag
value to swap the SDA and SCL pins assigment during attach.
Mostly from work with mbalmer@NetBSD.
ok miod@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.14 03-Dec-2008 stevesk

delete unused prototype, from lint; ok mbalmer@


# 1.13 30-Nov-2008 mbalmer

Fix output.


# 1.12 29-Nov-2008 mbalmer

Allow the words "on", "off", or "toggle" to be used instead of the
numerical values when writing to a pin; fix an error message.


# 1.11 26-Nov-2008 mbalmer

Reorder variables, add my copyright.


# 1.10 26-Nov-2008 mbalmer

Use the new gpio(4) semantics and change the command line syntax to a
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@


# 1.9 24-Nov-2008 jmc

- tweak previous
- kill .Tn


# 1.8 24-Nov-2008 mbalmer

Add and document -A and -D options to attach or detach devices at
runtime to a gpio bus.

ok uwe, drahn


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.7 17-Nov-2007 mbalmer

GPIO pins can be programmed to invert input or output on some devices.
Introduce new flags, GPIO_PIN_INVIN and GPIO_PIN_INVOUT, for this.

ok grange


# 1.6 17-Nov-2007 mbalmer

pull-down (GPIO_PIN_PULLDOWN) is a valid flags for some GPIO devices,
e.g. the AMD Geode C5536 GPIO.

ok grange


Revision tags: OPENBSD_4_2_BASE
# 1.5 18-Mar-2007 deraadt

use strtonum() to avoid out of range values, way simpler than the
12-line song and dance that standard functions need; bret.lambert@gmail


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.4 17-Nov-2005 grange

Unbreak; noticed by evol@online.ptt.ru.


# 1.3 16-Nov-2005 deraadt

no need for -h, any illegal option is fine


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.2 08-Aug-2004 deraadt

spacing


# 1.1 03-Jun-2004 grange

gpioctl -- program to control GPIO devices.
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@