pmsvar.h revision 1.2 1 /* $NetBSD: pmsvar.h,v 1.2 2005/01/18 10:22:51 scw Exp $ */
2
3 /*-
4 * Copyright (c) 2004 Kentaro Kurahone.
5 * Copyright (c) 2004 Ales Krenek.
6 * Copyright (c) 1994 Charles M. Hannum.
7 * Copyright (c) 1992, 1993 Erik Forsberg.
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 *
16 * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
19 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28 #ifndef _DEV_PCKBCPORT_PMSVAR_H_
29 #define _DEV_PCKBCPORT_PMSVAR_H_
30
31 enum pms_type {
32 PMS_UNKNOWN,
33 PMS_STANDARD,
34 PMS_SCROLL3,
35 PMS_SCROLL5,
36 PMS_SYNAPTICS
37 };
38
39 struct pms_protocol {
40 int rates[3];
41 int response;
42 const char *name;
43 };
44
45 struct pms_softc { /* driver status information */
46 struct device sc_dev;
47
48 pckbport_tag_t sc_kbctag;
49 int sc_kbcslot;
50
51 int sc_enabled; /* input enabled? */
52 #ifndef PMS_DISABLE_POWERHOOK
53 void *sc_powerhook; /* cookie from power hook */
54 int sc_suspended; /* suspended? */
55 #endif /* !PMS_DISABLE_POWERHOOK */
56 int inputstate; /* number of bytes received for this packet */
57 u_int buttons; /* mouse button status */
58 enum pms_type protocol;
59 unsigned char packet[6];
60 struct timeval last, current;
61
62 struct device *sc_wsmousedev;
63 struct proc *sc_event_thread;
64
65 #ifdef PMS_SYNAPTICS_TOUCHPAD
66 union {
67 struct synaptics_softc synaptics;
68 } u;
69 #endif
70 };
71
72 #endif
73