Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pckbc Pull in slightly modified ioctl() routine from...
details: https://anonhg.NetBSD.org/src/rev/35a3a581863f
branches: trunk
changeset: 472615:35a3a581863f
user: ad <ad%NetBSD.org@localhost>
date: Mon May 03 15:50:38 1999 +0000
description:
Pull in slightly modified ioctl() routine from psm.c (handles WSMOUSEIO_SRES).
diffstat:
sys/dev/pckbc/psm_intelli.c | 33 +++++++++++++++++++++++++++------
1 files changed, 27 insertions(+), 6 deletions(-)
diffs (52 lines):
diff -r 7d8e166071ea -r 35a3a581863f sys/dev/pckbc/psm_intelli.c
--- a/sys/dev/pckbc/psm_intelli.c Mon May 03 15:45:16 1999 +0000
+++ b/sys/dev/pckbc/psm_intelli.c Mon May 03 15:50:38 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: psm_intelli.c,v 1.4 1999/01/23 16:05:56 drochner Exp $ */
+/* $NetBSD: psm_intelli.c,v 1.5 1999/05/03 15:50:38 ad Exp $ */
/*-
* Copyright (c) 1994 Charles M. Hannum.
@@ -258,16 +258,37 @@
int flag;
struct proc *p;
{
-#if 0
- struct pms_softc *sc = v;
-#endif
+ struct pmsi_softc *sc = v;
+ u_char kbcmd[2];
+ int i;
switch (cmd) {
case WSMOUSEIO_GTYPE:
*(u_int *)data = WSMOUSE_TYPE_PS2;
- return (0);
+ break;
+
+ case WSMOUSEIO_SRES:
+ i = (*(u_int *)data - 12) / 25;
+
+ if (i < 0)
+ i = 0;
+
+ if (i > 3)
+ i = 3;
+
+ kbcmd[0] = PMS_SET_RES;
+ kbcmd[1] = i;
+ i = pckbc_enqueue_cmd(sc->sc_kbctag, sc->sc_kbcslot, kbcmd,
+ 2, 0, 1, 0);
+
+ if (i)
+ printf("pms_ioctl: SET_RES command error\n");
+ break;
+
+ default:
+ return (-1);
}
- return (-1);
+ return (0);
}
/* Masks for the first byte of a packet */
Home |
Main Index |
Thread Index |
Old Index