1*305d9e87Smiod /* $OpenBSD: amsvar.h,v 1.1 2006/01/18 23:21:17 miod Exp $ */ 2*305d9e87Smiod /* $NetBSD: amsvar.h,v 1.4 1999/06/17 06:59:05 tsubai Exp $ */ 3*305d9e87Smiod 4*305d9e87Smiod /* 5*305d9e87Smiod * Copyright (C) 1998 Colin Wood 6*305d9e87Smiod * All rights reserved. 7*305d9e87Smiod * 8*305d9e87Smiod * Redistribution and use in source and binary forms, with or without 9*305d9e87Smiod * modification, are permitted provided that the following conditions 10*305d9e87Smiod * are met: 11*305d9e87Smiod * 1. Redistributions of source code must retain the above copyright 12*305d9e87Smiod * notice, this list of conditions and the following disclaimer. 13*305d9e87Smiod * 2. Redistributions in binary form must reproduce the above copyright 14*305d9e87Smiod * notice, this list of conditions and the following disclaimer in the 15*305d9e87Smiod * documentation and/or other materials provided with the distribution. 16*305d9e87Smiod * 3. All advertising materials mentioning features or use of this software 17*305d9e87Smiod * must display the following acknowledgement: 18*305d9e87Smiod * This product includes software developed by Colin Wood. 19*305d9e87Smiod * 4. The name of the author may not be used to endorse or promote products 20*305d9e87Smiod * derived from this software without specific prior written permission. 21*305d9e87Smiod * 22*305d9e87Smiod * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 23*305d9e87Smiod * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24*305d9e87Smiod * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25*305d9e87Smiod * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 26*305d9e87Smiod * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27*305d9e87Smiod * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28*305d9e87Smiod * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29*305d9e87Smiod * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30*305d9e87Smiod * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31*305d9e87Smiod * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32*305d9e87Smiod */ 33*305d9e87Smiod 34*305d9e87Smiod #ifndef _ADB_AMSVAR_H_ 35*305d9e87Smiod #define _ADB_AMSVAR_H_ 36*305d9e87Smiod 37*305d9e87Smiod /* 38*305d9e87Smiod * State info, per mouse instance. 39*305d9e87Smiod */ 40*305d9e87Smiod struct ams_softc { 41*305d9e87Smiod struct device sc_dev; 42*305d9e87Smiod 43*305d9e87Smiod /* ADB info */ 44*305d9e87Smiod int origaddr; /* ADB device type (ADBADDR_MS) */ 45*305d9e87Smiod int adbaddr; /* current ADB address */ 46*305d9e87Smiod int handler_id; /* type of mouse */ 47*305d9e87Smiod 48*305d9e87Smiod /* Extended Mouse Protocol info, faked for non-EMP mice */ 49*305d9e87Smiod u_int8_t sc_class; /* mouse class (mouse, trackball) */ 50*305d9e87Smiod u_int8_t sc_buttons; /* number of buttons */ 51*305d9e87Smiod u_int32_t sc_res; /* mouse resolution (dpi) */ 52*305d9e87Smiod char sc_devid[5]; /* device identifier */ 53*305d9e87Smiod 54*305d9e87Smiod int sc_mb; /* current button state */ 55*305d9e87Smiod struct device *sc_wsmousedev; 56*305d9e87Smiod }; 57*305d9e87Smiod 58*305d9e87Smiod /* EMP device classes */ 59*305d9e87Smiod #define MSCLASS_TABLET 0 60*305d9e87Smiod #define MSCLASS_MOUSE 1 61*305d9e87Smiod #define MSCLASS_TRACKBALL 2 62*305d9e87Smiod #define MSCLASS_TRACKPAD 3 63*305d9e87Smiod 64*305d9e87Smiod #endif /* _ADB_AMSVAR_H_ */ 65