/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* 5-Byte Mouse Protocol
*/
#include <sys/vuid_event.h>
#include "vuidmice.h"
int
{
/*
* The current kdmconfig tables imply that this module can be used
* for both 2- and 3- button mice, so based on that evidence we
* can't assume a constant. I don't know whether it's possible
* to autodetect.
*/
return (0);
}
static void
{
int b;
/* for each button, see if it has changed */
for (b = 0; b < 3; b++) {
}
}
void
{
int r, code;
for (r--; r >= 0; r--) {
/*
* Start state. We stay here if the start code is not
* received thus forcing us back into sync. When we
* get a start code the button mask comes with it
* forcing us to the next state.
*/
default:
case LOGI_START:
break;
/* or xlate[code & ] */
break;
case LOGI_BUTTON:
/*
* We receive the first of 2 delta x which forces us
* to the next state. We just add the values of each
* delta x together.
*/
goto resync;
}
/* (The cast sign extends the 8-bit value.) */
break;
case LOGI_DELTA_X1:
/*
* The first of 2 delta y. We just add
* the 2 delta y together
*/
goto resync;
}
/* (The cast sign extends the 8-bit value.) */
break;
case LOGI_DELTA_Y1:
/*
* The second of 2 delta x. We just add
* the 2 delta x together.
*/
goto resync;
}
/* (The cast sign extends the 8-bit value.) */
break;
case LOGI_DELTA_X2:
/*
* The second of 2 delta y. We just add
* the 2 delta y together.
*/
goto resync;
}
/* (The cast sign extends the 8-bit value.) */
/* check if motion has occurred and send event(s)... */
/* see if the buttons have changed */
/* buttons have changed */
/* update new button state */
}
}
}
}