Module Name:    src
Committed By:   abs
Date:           Sun May 27 10:45:49 UTC 2012

Modified Files:
        src/share/man/man4: wsdisplay.4 wskbd.4 wsmouse.4

Log Message:
Document WSDISPLAYIO_SETVERSION, WSKBDIO_SETVERSION and WSMOUSEIO_SETVERSION
ioctls(). Also at least enumerate the WSKBDIO_ ioctls().


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/share/man/man4/wsdisplay.4
cvs rdiff -u -r1.14 -r1.15 src/share/man/man4/wskbd.4
cvs rdiff -u -r1.20 -r1.21 src/share/man/man4/wsmouse.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/wsdisplay.4
diff -u src/share/man/man4/wsdisplay.4:1.38 src/share/man/man4/wsdisplay.4:1.39
--- src/share/man/man4/wsdisplay.4:1.38	Thu Jun 30 22:13:02 2011
+++ src/share/man/man4/wsdisplay.4	Sun May 27 10:45:49 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: wsdisplay.4,v 1.38 2011/06/30 22:13:02 wiz Exp $
+.\" $NetBSD: wsdisplay.4,v 1.39 2012/05/27 10:45:49 abs Exp $
 .\"
 .\" Copyright (c) 1999 Matthias Drochner.
 .\" Copyright (c) 2002 Ben Harris.
@@ -561,6 +561,18 @@ and the driver will set data_size to the
 Otherwise the EDID block will be written into the buffer pointed
 at by edid_data and data_size will be set to the number of bytes
 written.
+.It Dv WSDISPLAYIO_SETVERSION Pq Li "int"
+Set the wscons_event protocol version.
+The default is 0 for binary compatibility. The latest version is
+always available as WSDISPLAYIO_EVENT_VERSION, and is currently 1.
+All new code should use a call similar to the below to ensure the
+correct version is returned.
+.Bd -literal -offset indent
+int ver = WSDISPLAY_EVENT_VERSION;
+if (ioctl(fd, WSDISPLAYIO_SETVERSION, &ver) == -1)
+    err(EXIT_FAILURE, "cannot set version");
+.Ed
+.El
 .El
 .Sh FILES
 .Bl -item

Index: src/share/man/man4/wskbd.4
diff -u src/share/man/man4/wskbd.4:1.14 src/share/man/man4/wskbd.4:1.15
--- src/share/man/man4/wskbd.4:1.14	Sun Mar  6 17:39:05 2011
+++ src/share/man/man4/wskbd.4	Sun May 27 10:45:49 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: wskbd.4,v 1.14 2011/03/06 17:39:05 wiz Exp $
+.\" $NetBSD: wskbd.4,v 1.15 2012/05/27 10:45:49 abs Exp $
 .\"
 .\" Copyright (c) 1999
 .\" 	Matthias Drochner.  All rights reserved.
@@ -114,6 +114,41 @@ match if the device is in use as system 
 (The console device selection in early system startup is not influenced.)
 This way, the console device can be connected to a known
 wskbd device instance.
+.Ss Ioctls
+The following
+.Xr ioctl 2
+calls are provided by the
+.Nm
+driver or by devices which use it.
+Their definitions are found in
+.Pa dev/wscons/wsconsio.h .
+.Bl -tag -width Dv
+.It Dv WSKBDIO_GTYPE
+Get the keyboard type.
+.It Dv WSKBDIO_COMPLEXBELL, WSKBDIO_SETBELL, WSKBDIO_GETBELL, WSKBDIO_SETDEFAULTBELL, WSKBDIO_GETDEFAULTBELL Pq Li "struct wsmouse_repeat"
+Get and set keyboard bell settings.
+.It Dv WSKBDIO_SETKEYREPEAT, WSKBDIO_GETKEYREPEAT, WSKBDIO_SETDEFAULTKEYREPEAT, WSKBDIO_GETDEFAULTKEYREPEAT Pq Li "struct wskbd_keyrepeat_data"
+Get and set keyboard autorepeat settings.
+.It Dv WSKBDIO_SETLEDS, WSKBDIO_GETLEDS Pq Li "int"
+Get and set keyboard LED settings.
+.It Dv WSKBDIO_GETMAP, WSKBDIO_SETMAP Pq Li "struct wskbd_map_data"
+Get and set keyboard keymapping settings.
+.It Dv WSKBDIO_GETENCODING, WSKBDIO_SETENCODING Pq Li "kbd_t"
+Get and set keyboard encoding settings.
+.It Dv WSKBDIO_GETKEYCLICK, WSKBDIO_SETKEYCLICK Pq Li "int"
+Get and set keyboard keyclick settings.
+.It Dv WSKBDIO_SETVERSION Pq Li "int"
+Set the wscons_event protocol version.
+The default is 0 for binary compatibility. The latest version is
+always available as WSKBD_EVENT_VERSION, and is currently 1.
+All new code should use a call similar to the below to ensure the
+correct version is returned.
+.Bd -literal -offset indent
+int ver = WSKBD_EVENT_VERSION;
+if (ioctl(fd, WSKBDIO_SETVERSION, &ver) == -1)
+    err(EXIT_FAILURE, "cannot set version");
+.Ed
+.El
 .Sh FILES
 .Bl -item
 .It

Index: src/share/man/man4/wsmouse.4
diff -u src/share/man/man4/wsmouse.4:1.20 src/share/man/man4/wsmouse.4:1.21
--- src/share/man/man4/wsmouse.4:1.20	Tue Jan 17 08:23:40 2012
+++ src/share/man/man4/wsmouse.4	Sun May 27 10:45:49 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: wsmouse.4,v 1.20 2012/01/17 08:23:40 wiz Exp $
+.\" $NetBSD: wsmouse.4,v 1.21 2012/05/27 10:45:49 abs Exp $
 .\"
 .\" Copyright (c) 1999
 .\" 	Matthias Drochner.  All rights reserved.
@@ -27,7 +27,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd January 17, 2012
+.Dd May 24, 2012
 .Dt WSMOUSE 4
 .Os
 .Sh NAME
@@ -48,6 +48,8 @@
 (Apple ADB mouse)
 .Cd "wsmouse*	at btms? mux 0"
 (Bluetooth mouse)
+.Cd "wsmouse*   at lkms? mux 0"
+(DEC VSXXX serial mice)
 .Sh DESCRIPTION
 The
 .Nm
@@ -111,6 +113,17 @@ Set the automatic button repeating confi
 See
 .Dv WSMOUSEIO_GETREPEAT
 above for more details.
+.It Dv WSMOUSEIO_SETVERSION Pq Li "int"
+Set the wscons_event protocol version.
+The default is 0 for binary compatibility. The latest version is
+always available as WSMOUSE_EVENT_VERSION, and is currently 1.
+All new code should use a call similar to the below to ensure the
+correct version is returned.
+.Bd -literal -offset indent
+int ver = WSMOUSE_EVENT_VERSION;
+if (ioctl(fd, WSMOUSEIO_SETVERSION, &ver) == -1)
+    err(EXIT_FAILURE, "cannot set version");
+.Ed
 .El
 .Sh FILES
 .Bl -item

Reply via email to