Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc Add support for Kensington Turbo Mouse.
details: https://anonhg.NetBSD.org/src/rev/7cf2bbb366a1
branches: trunk
changeset: 500828:7cf2bbb366a1
user: tsubai <tsubai%NetBSD.org@localhost>
date: Tue Dec 19 02:59:23 2000 +0000
description:
Add support for Kensington Turbo Mouse.
diffstat:
sys/arch/macppc/dev/ams.c | 22 +++++++++++++++++++++-
sys/arch/macppc/include/adbsys.h | 3 ++-
2 files changed, 23 insertions(+), 2 deletions(-)
diffs (60 lines):
diff -r 78d511f4b9ee -r 7cf2bbb366a1 sys/arch/macppc/dev/ams.c
--- a/sys/arch/macppc/dev/ams.c Tue Dec 19 02:50:11 2000 +0000
+++ b/sys/arch/macppc/dev/ams.c Tue Dec 19 02:59:23 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ams.c,v 1.9 2000/12/19 02:50:11 tsubai Exp $ */
+/* $NetBSD: ams.c,v 1.10 2000/12/19 02:59:23 tsubai Exp $ */
/*
* Copyright (C) 1998 Colin Wood
@@ -134,6 +134,9 @@
case ADBMS_UCONTOUR:
printf("Contour mouse, default parameters\n");
break;
+ case ADBMS_TURBO:
+ printf("Kensington Turbo Mouse\n");
+ break;
case ADBMS_EXTENDED:
if (sc->sc_devid[0] == '\0') {
printf("Logitech ");
@@ -245,6 +248,23 @@
sc->sc_res = 200;
return;
}
+ if (sc->handler_id == ADBMS_TURBO) {
+ /* Found Kensington Turbo Mouse */
+ static u_char data1[] =
+ { 8, 0xe7, 0x8c, 0, 0, 0, 0xff, 0xff, 0x94 };
+ static u_char data2[] =
+ { 8, 0xa5, 0x14, 0, 0, 0x69, 0xff, 0xff, 0x27 };
+
+ buffer[0] = 0;
+ adb_op_sync((Ptr)buffer, (Ptr)0, (Ptr)0, ADBFLUSH(adbaddr));
+
+ adb_op_sync((Ptr)data1, (Ptr)0, (Ptr)0, ADBLISTEN(adbaddr, 2));
+
+ buffer[0] = 0;
+ adb_op_sync((Ptr)buffer, (Ptr)0, (Ptr)0, ADBFLUSH(adbaddr));
+
+ adb_op_sync((Ptr)data2, (Ptr)0, (Ptr)0, ADBLISTEN(adbaddr, 2));
+ }
if ((sc->handler_id == ADBMS_100DPI) ||
(sc->handler_id == ADBMS_200DPI)) {
/* found a mouse */
diff -r 78d511f4b9ee -r 7cf2bbb366a1 sys/arch/macppc/include/adbsys.h
--- a/sys/arch/macppc/include/adbsys.h Tue Dec 19 02:50:11 2000 +0000
+++ b/sys/arch/macppc/include/adbsys.h Tue Dec 19 02:59:23 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: adbsys.h,v 1.3 1999/06/16 08:48:37 tsubai Exp $ */
+/* $NetBSD: adbsys.h,v 1.4 2000/12/19 02:59:24 tsubai Exp $ */
/*-
* Copyright (C) 1993, 1994 Allen K. Briggs, Chris P. Caputo,
@@ -128,6 +128,7 @@
#define ADBMS_EXTENDED 4 /* Extended mouse protocol */
#define ADBMS_USPEED 0x2f /* MicroSpeed mouse */
#define ADBMS_UCONTOUR 0x66 /* Contour mouse */
+#define ADBMS_TURBO 50 /* Kensington Turbo Mouse */
/* Interesting tablet handler ID */
#define ADB_ARTPAD 58 /* WACOM ArtPad II tablet */
Home |
Main Index |
Thread Index |
Old Index