From 12de309c050d29147ff662e22bbfbaea3ea29606 Mon Sep 17 00:00:00 2001 From: explorer Date: Tue, 15 Oct 1996 19:07:37 +0000 Subject: [PATCH] Update the config file line to what is currently used, RCSID police, and document that the device spits out the busmouse protocol. Also, add some information on the busmouse protocol itself. --- share/man/man4/man4.i386/pms.4 | 35 ++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/share/man/man4/man4.i386/pms.4 b/share/man/man4/man4.i386/pms.4 index 16d22e076e1c..90f8cd31e99c 100644 --- a/share/man/man4/man4.i386/pms.4 +++ b/share/man/man4/man4.i386/pms.4 @@ -1,3 +1,4 @@ +.\" $NetBSD: pms.4,v 1.6 1996/10/15 19:07:37 explorer Exp $ .\" .\" Copyright (c) 1993 Christopher G. Demetriou .\" All rights reserved. @@ -27,8 +28,6 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: pms.4,v 1.5 1995/02/17 09:43:47 jtc Exp $ -.\" .Dd August 6, 1993 .Dt PMS 4 i386 .Os NetBSD 0.8a @@ -38,14 +37,42 @@ PS/2 auxiliary port mouse driver .Sh SYNOPSIS .\" XXX this is awful hackery to get it to work right... -- cgd -.Cd "pms0 at isa? port" \&"IO_KBD\&" irq 12 +.Cd "pms0 at pckbd? irq 12 .Sh DESCRIPTION -This driver provides an interface to a PS/2 auxiliary port mice. +This driver provides an interface to a PS/2 auxiliary port mice. The driver +internally converts the PS/2 mouse output into the busmouse protocol. +.Pp +Information can be retrieved from the driver using an ioctl() call or +by reading the device directly using read(). +.Pp +The MOUSEIOCREAD ioctl, found in machine/mouse.h, returns a struct mouseinfo. +.Pp +When reading the mouse device directly, each change of button state or +mouse movement generates a five byte event. +The bytes contain: +.Bl -tag -width -offset indent -compact +.It 1 +Button status. (u_char) +.It 2 +Right/left movement. Positive values indicate right, negative +left. (char) +.It 3 +Up/down movement. Positive values indicate up, negative down. (char) +.It 4 +Reserved. Should be zero. +.It 5 +Reserved. Should be zero. +.El +.Pp +The direction bytes are signed characters, giving a range of +127 to -127. +A positive value indicates movement to the right or up, and negative left +or down. .Sh FILES .Bl -tag -width Pa -compact .It Pa /dev/pms0 PS/2 mouse device file .El .Sh SEE ALSO +.Xr ioctl 2 , .Xr lms 4 , .Xr mms 4