OpenBSD CVS

CVS log for src/usr.sbin/gpioctl/gpioctl.c


[BACK] Up to [local] / src / usr.sbin / gpioctl

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.17 / (download) - annotate - [select for diffs], Sat Dec 26 20:52:03 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, HEAD
Changes since 1.16: +8 -8 lines
Diff to previous 1.16 (colored)

bzero -> memset. No binary change.

ok tb@

Revision 1.16 / (download) - annotate - [select for diffs], Tue Oct 4 07:19:13 2011 UTC (12 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

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

ok matthieu

Revision 1.15 / (download) - annotate - [select for diffs], Mon Oct 3 20:24:51 2011 UTC (12 years, 8 months ago) by matthieu
Branch: MAIN
Changes since 1.14: +19 -11 lines
Diff to previous 1.14 (colored)

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 1.14 / (download) - annotate - [select for diffs], Wed Dec 3 20:12:44 2008 UTC (15 years, 6 months ago) by stevesk
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.13: +1 -2 lines
Diff to previous 1.13 (colored)

delete unused prototype, from lint; ok mbalmer@

Revision 1.13 / (download) - annotate - [select for diffs], Sun Nov 30 10:58:44 2008 UTC (15 years, 6 months ago) by mbalmer
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

Fix output.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Nov 29 09:19:25 2008 UTC (15 years, 6 months ago) by mbalmer
Branch: MAIN
Changes since 1.11: +16 -7 lines
Diff to previous 1.11 (colored)

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

Revision 1.11 / (download) - annotate - [select for diffs], Wed Nov 26 15:02:43 2008 UTC (15 years, 6 months ago) by mbalmer
Branch: MAIN
Changes since 1.10: +6 -8 lines
Diff to previous 1.10 (colored)

Reorder variables, add my copyright.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Nov 26 14:56:10 2008 UTC (15 years, 6 months ago) by mbalmer
Branch: MAIN
Changes since 1.9: +150 -104 lines
Diff to previous 1.9 (colored)

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@

Revision 1.9 / (download) - annotate - [select for diffs], Mon Nov 24 15:27:52 2008 UTC (15 years, 6 months ago) by jmc
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

- tweak previous
- kill .Tn

Revision 1.8 / (download) - annotate - [select for diffs], Mon Nov 24 14:11:58 2008 UTC (15 years, 6 months ago) by mbalmer
Branch: MAIN
Changes since 1.7: +68 -4 lines
Diff to previous 1.7 (colored)

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

ok uwe, drahn

Revision 1.7 / (download) - annotate - [select for diffs], Sat Nov 17 16:55:05 2007 UTC (16 years, 6 months ago) by mbalmer
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.6: +3 -1 lines
Diff to previous 1.6 (colored)

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

Revision 1.6 / (download) - annotate - [select for diffs], Sat Nov 17 09:05:23 2007 UTC (16 years, 6 months ago) by mbalmer
Branch: MAIN
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (colored)

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

ok grange

Revision 1.5 / (download) - annotate - [select for diffs], Sun Mar 18 16:16:56 2007 UTC (17 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.4: +7 -6 lines
Diff to previous 1.4 (colored)

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 1.4 / (download) - annotate - [select for diffs], Thu Nov 17 10:18:18 2005 UTC (18 years, 6 months ago) by grange
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

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

Revision 1.3 / (download) - annotate - [select for diffs], Wed Nov 16 16:40:28 2005 UTC (18 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +4 -6 lines
Diff to previous 1.2 (colored)

no need for -h, any illegal option is fine

Revision 1.2 / (download) - annotate - [select for diffs], Sun Aug 8 00:05:09 2004 UTC (19 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.1: +4 -4 lines
Diff to previous 1.1 (colored)

spacing

Revision 1.1 / (download) - annotate - [select for diffs], Thu Jun 3 19:13:24 2004 UTC (20 years ago) by grange
Branch: MAIN

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@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.