Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Jonatha Kollasch has a GPIO device that can pulse the output...



details:   https://anonhg.NetBSD.org/src/rev/ab94de21544d
branches:  trunk
changeset: 747636:ab94de21544d
user:      mbalmer <mbalmer%NetBSD.org@localhost>
date:      Fri Sep 25 19:37:03 2009 +0000

description:
Jonatha Kollasch has a GPIO device that can pulse the output lines.
Support it wuth the GPIO_PIN_PULSE attribute and the 'pulse' paramater
to gpioctl.  Discussed with Jonathan.

diffstat:

 share/man/man4/gpio.4      |  6 ++++--
 sys/sys/gpio.h             |  4 +++-
 usr.sbin/gpioctl/gpioctl.8 |  6 ++++--
 usr.sbin/gpioctl/gpioctl.c |  3 ++-
 4 files changed, 13 insertions(+), 6 deletions(-)

diffs (91 lines):

diff -r aa046e494be3 -r ab94de21544d share/man/man4/gpio.4
--- a/share/man/man4/gpio.4     Fri Sep 25 19:21:09 2009 +0000
+++ b/share/man/man4/gpio.4     Fri Sep 25 19:37:03 2009 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: gpio.4,v 1.14 2009/08/23 15:41:28 wiz Exp $
+.\" $NetBSD: gpio.4,v 1.15 2009/09/25 19:37:03 mbalmer Exp $
 .\"    $OpenBSD: gpio.4,v 1.5 2004/11/23 09:39:29 reyk Exp $
 .\"
 .\" Copyright (c) 2004 Alexander Yurchenko <grange%openbsd.org@localhost>
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd August 23, 2009
+.Dd September 25, 2009
 .Dt GPIO 4
 .Os
 .Sh NAME
@@ -163,6 +163,8 @@
 invert input
 .It Dv GPIO_PIN_INVOUT
 invert output
+.It Dv GPIO_PIN_PULSE
+pulse output
 .El
 .Pp
 Note that the GPIO controller
diff -r aa046e494be3 -r ab94de21544d sys/sys/gpio.h
--- a/sys/sys/gpio.h    Fri Sep 25 19:21:09 2009 +0000
+++ b/sys/sys/gpio.h    Fri Sep 25 19:37:03 2009 +0000
@@ -1,6 +1,7 @@
-/* $NetBSD: gpio.h,v 1.5 2009/09/22 01:29:36 isaki Exp $ */
+/* $NetBSD: gpio.h,v 1.6 2009/09/25 19:37:03 mbalmer Exp $ */
 /*     $OpenBSD: gpio.h,v 1.7 2008/11/26 14:51:20 mbalmer Exp $        */
 /*
+ * Copyright (c) 2009 Marc Balmer <marc%msys.ch@localhost>
  * Copyright (c) 2004 Alexander Yurchenko <grange%openbsd.org@localhost>
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -38,6 +39,7 @@
 #define GPIO_PIN_INVIN         0x0100  /* invert input */
 #define GPIO_PIN_INVOUT                0x0200  /* invert output */
 #define GPIO_PIN_USER          0x0400  /* user != 0 can access */
+#define GPIO_PIN_PULSE         0x0800  /* pulse in hardware */
 #define GPIO_PIN_SET           0x8000  /* set for securelevel access */
 
 /* GPIO controller description */
diff -r aa046e494be3 -r ab94de21544d usr.sbin/gpioctl/gpioctl.8
--- a/usr.sbin/gpioctl/gpioctl.8        Fri Sep 25 19:21:09 2009 +0000
+++ b/usr.sbin/gpioctl/gpioctl.8        Fri Sep 25 19:37:03 2009 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: gpioctl.8,v 1.5 2009/07/25 16:18:09 mbalmer Exp $
+.\" $NetBSD: gpioctl.8,v 1.6 2009/09/25 19:37:03 mbalmer Exp $
 .\"
 .\" Copyright (c) 2009 Marc Balmer <marc%msys.ch@localhost>
 .\" Copyright (c) 2004 Alexander Yurchenko <grange%openbsd.org@localhost>
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd July 15, 2009
+.Dd September 25, 2009
 .Dt GPIOCTL 8
 .Os
 .Sh NAME
@@ -137,6 +137,8 @@
 invert input
 .It iout
 invert output
+.It pulse
+pulse output
 .El
 .Pp
 Note that not all the flags may be supported by the particular GPIO controller.
diff -r aa046e494be3 -r ab94de21544d usr.sbin/gpioctl/gpioctl.c
--- a/usr.sbin/gpioctl/gpioctl.c        Fri Sep 25 19:21:09 2009 +0000
+++ b/usr.sbin/gpioctl/gpioctl.c        Fri Sep 25 19:37:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gpioctl.c,v 1.6 2009/07/25 16:18:09 mbalmer Exp $ */
+/* $NetBSD: gpioctl.c,v 1.7 2009/09/25 19:37:03 mbalmer Exp $ */
 
 /*
  * Copyright (c) 2008 Marc Balmer <mbalmer%openbsd.org@localhost>
@@ -67,6 +67,7 @@
        { GPIO_PIN_PULLDOWN, "pd" },
        { GPIO_PIN_INVIN, "iin" },
        { GPIO_PIN_INVOUT, "iout" },
+       { GPIO_PIN_PULSE, "pulse" },
        { 0, NULL },
 };
 



Home | Main Index | Thread Index | Old Index