amsvar.h revision 1.1
11.1Stsubai/* $Id: amsvar.h,v 1.1 1998/10/13 11:21:22 tsubai Exp $ */ 21.1Stsubai 31.1Stsubai/* 41.1Stsubai * Copyright (C) 1998 Colin Wood 51.1Stsubai * All rights reserved. 61.1Stsubai * 71.1Stsubai * Redistribution and use in source and binary forms, with or without 81.1Stsubai * modification, are permitted provided that the following conditions 91.1Stsubai * are met: 101.1Stsubai * 1. Redistributions of source code must retain the above copyright 111.1Stsubai * notice, this list of conditions and the following disclaimer. 121.1Stsubai * 2. Redistributions in binary form must reproduce the above copyright 131.1Stsubai * notice, this list of conditions and the following disclaimer in the 141.1Stsubai * documentation and/or other materials provided with the distribution. 151.1Stsubai * 3. All advertising materials mentioning features or use of this software 161.1Stsubai * must display the following acknowledgement: 171.1Stsubai * This product includes software developed by Colin Wood. 181.1Stsubai * 4. The name of the author may not be used to endorse or promote products 191.1Stsubai * derived from this software without specific prior written permission. 201.1Stsubai * 211.1Stsubai * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 221.1Stsubai * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 231.1Stsubai * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 241.1Stsubai * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 251.1Stsubai * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 261.1Stsubai * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 271.1Stsubai * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 281.1Stsubai * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 291.1Stsubai * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 301.1Stsubai * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 311.1Stsubai */ 321.1Stsubai 331.1Stsubai#ifndef _MAC68K_MSVAR_H_ 341.1Stsubai#define _MAC68K_MSVAR_H_ 351.1Stsubai 361.1Stsubai/* 371.1Stsubai * State info, per mouse instance. 381.1Stsubai */ 391.1Stsubaistruct ms_softc { 401.1Stsubai struct device sc_dev; 411.1Stsubai 421.1Stsubai /* ADB info */ 431.1Stsubai u_int8_t origaddr; /* ADB device type (ADBADDR_MS) */ 441.1Stsubai u_int8_t adbaddr; /* current ADB address */ 451.1Stsubai u_int8_t handler_id; /* type of mouse */ 461.1Stsubai 471.1Stsubai /* Extended Mouse Protocol info, faked for non-EMP mice */ 481.1Stsubai u_int8_t sc_class; /* mouse class (mouse, trackball) */ 491.1Stsubai u_int8_t sc_buttons; /* number of buttons */ 501.1Stsubai u_int32_t sc_res; /* mouse resolution (dpi) */ 511.1Stsubai char sc_devid[5]; /* device indentifier */ 521.1Stsubai 531.1Stsubai int sc_mb; /* current button state */ 541.1Stsubai}; 551.1Stsubai 561.1Stsubai/* EMP device classes */ 571.1Stsubai#define MSCLASS_TABLET 0 581.1Stsubai#define MSCLASS_MOUSE 1 591.1Stsubai#define MSCLASS_TRACKBALL 2 601.1Stsubai 611.1Stsubaivoid ms_adbcomplete __P((caddr_t buffer, caddr_t data_area, int adb_command)); 621.1Stsubaivoid ms_handoff __P((adb_event_t *event, struct ms_softc *)); 631.1Stsubai 641.1Stsubai#endif /* _MAC68K_MSVAR_H_ */ 65