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