Add support for the Contour 3-button mouse, inadvertantly missed
in the ADB split a few months back. Noticed by Takashi NAKAMURA.
This commit is contained in:
parent
27443c6d0f
commit
2159f8a301
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: ms.c,v 1.1 1998/10/23 01:16:24 ender Exp $ */
|
/* $Id: ms.c,v 1.2 1999/01/16 22:49:37 scottr Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 1998 Colin Wood
|
* Copyright (C) 1998 Colin Wood
|
||||||
|
@ -131,6 +131,9 @@ msattach(parent, self, aux)
|
||||||
case ADBMS_USPEED:
|
case ADBMS_USPEED:
|
||||||
printf("MicroSpeed mouse, default parameters\n");
|
printf("MicroSpeed mouse, default parameters\n");
|
||||||
break;
|
break;
|
||||||
|
case ADBMS_UCONTOUR:
|
||||||
|
printf("Contour mouse, default parameters\n");
|
||||||
|
break;
|
||||||
case ADBMS_EXTENDED:
|
case ADBMS_EXTENDED:
|
||||||
if (sc->sc_devid[0] == '\0') {
|
if (sc->sc_devid[0] == '\0') {
|
||||||
printf("Logitech ");
|
printf("Logitech ");
|
||||||
|
@ -202,14 +205,15 @@ ems_init(sc)
|
||||||
adbaddr = sc->adbaddr;
|
adbaddr = sc->adbaddr;
|
||||||
if (sc->origaddr != ADBADDR_MS)
|
if (sc->origaddr != ADBADDR_MS)
|
||||||
return;
|
return;
|
||||||
if (sc->handler_id == ADBMS_USPEED) {
|
if (sc->handler_id == ADBMS_USPEED ||
|
||||||
/* Found MicroSpeed Mouse Deluxe Mac */
|
sc->handler_id == ADBMS_UCONTOUR) {
|
||||||
|
/* Found MicroSpeed Mouse Deluxe Mac or Contour Mouse */
|
||||||
cmd = ((adbaddr<<4)&0xF0)|0x9; /* listen 1 */
|
cmd = ((adbaddr<<4)&0xF0)|0x9; /* listen 1 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* To setup the MicroSpeed, it appears that we can
|
* To setup the MicroSpeed or the Contour, it appears
|
||||||
* send the following command to the mouse and then
|
* that we can send the following command to the mouse
|
||||||
* expect data back in the form:
|
* and then expect data back in the form:
|
||||||
* buffer[0] = 4 (bytes)
|
* buffer[0] = 4 (bytes)
|
||||||
* buffer[1], buffer[2] as std. mouse
|
* buffer[1], buffer[2] as std. mouse
|
||||||
* buffer[3] = buffer[4] = 0xff when no buttons
|
* buffer[3] = buffer[4] = 0xff when no buttons
|
||||||
|
@ -481,7 +485,8 @@ ms_processevent(event, msc)
|
||||||
button_bit = 1;
|
button_bit = 1;
|
||||||
switch (event->hand_id) {
|
switch (event->hand_id) {
|
||||||
case ADBMS_USPEED:
|
case ADBMS_USPEED:
|
||||||
/* MicroSpeed mouse */
|
case ADBMS_UCONTOUR:
|
||||||
|
/* MicroSpeed mouse and Contour mouse */
|
||||||
if (max_byte == 4)
|
if (max_byte == 4)
|
||||||
buttons = (~event->bytes[2]) & 0xff;
|
buttons = (~event->bytes[2]) & 0xff;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue