/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_USB_USBMS_H
#define _SYS_USB_USBMS_H
#ifdef __cplusplus
extern "C" {
#endif
struct usbmouseinfo {
};
struct usbmousebuf {
};
typedef struct usbms_input {
} usbms_idf;
typedef struct usbms_state {
int usbms_flags;
/*
* Is an ioctl fails because an mblk wasn't
* available, the mlbk is saved here.
*/
/* mouse software structure from msreg.h */
/* Previous button byte */
char usbms_oldbutt;
/* Report descriptor handle received from hid */
/*
* Max pixel delta of jitter controlled. As this number increases
* the jumpiness of the msd increases, i.e., the coarser the motion
* for mediumm speeds.
* jitter_thresh is the maximum number of jitters suppressed. Thus,
* hz/jitter_thresh is the maximum interval of jitters suppressed. As
* jitter_thresh increases, a wider range of jitter is suppressed.
* However, the more inertia the mouse seems to have, i.e., the slower
* the mouse is to react.
*/
int usbms_jitter_thresh;
/* Timeout used when mstimeout in effect */
/*
* Measure how many (speed_count) msd deltas exceed threshold
* (speedlimit). If speedlaw then throw away deltas over speedlimit.
* This is to keep really bad mice that jump around from getting
* too far.
*/
/* Threshold above which deltas are thrown out */
int usbms_speedlimit;
/* No. of deltas exceeding spd. limit */
int usbms_speed_count;
/* Screen resolution for absolute mouse */
/* report the abs mouse event to upper level once */
/* Macro to find absolute value */
#define USB_ABS(x) ((x) < 0 ? -(x) : (x))
/*
* Macro to restrict the value of x to lie between 127 & -127 :
* if x > 127 return 127
* else if x < -127 return -127
* else return x
*/
/*
* Default and MAX (supported) number of buttons
*/
/*
* Input routine states. See usbms_input().
*/
/*
* default resolution, 1024x768.
*/
/*
* USB buttons:
* How the device sends it:
* 0x01 - Left button position
* 0x02 - Right button position
* 0x04 - Middle button position
*/
/*
* These defines are for converting USB button information to the
* format that Type 5 mouse sends upstream, which is what the xserver
* expects.
*/
/*
* State structure used for transparent ioctls
*/
typedef struct usbms_iocstate {
int ioc_state;
/*
* Transparent ioctl states
*/
/*
* Private data are initialized to these values
*/
/* Jitter Timeout while initialization */
/*
* Masks for debug printing
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_USB_USBMS_H */