Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / dev / pckbport / synapticsreg.h
blob7323f662c429989d78f233bbfb26ed688987e156
1 /* $NetBSD: synapticsreg.h,v 1.4 2005/12/11 12:23:22 christos Exp $ */
3 /*
4 * Copyright (c) 2005, Steve C. Woodford
5 * Copyright (c) 2004, Ales Krenek
6 * Copyright (c) 2004, Kentaro A. Kurahone
7 * All rights reserved.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
13 * * Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * * Redistributions in binary form must reproduce the above
16 * copyright notice, this list of conditions and the following
17 * disclaimer in the documentation and/or other materials provided
18 * with the distribution.
19 * * Neither the name of the Kentaro A. Kurahone nor the names of its
20 * contributors may be used to endorse or promote products derived
21 * from this software without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE.
38 #ifndef _DEV_PCKBCPORT_SYNAPTICSREG_H_
39 #define _DEV_PCKBCPORT_SYNAPTICSREG_H_
41 /* Synaptics information queries. */
42 #define SYNAPTICS_IDENTIFY_TOUCHPAD 0x0
43 #define SYNAPTICS_READ_MODE 0x1
44 #define SYNAPTICS_READ_CAPABILITIES 0x2
45 #define SYNAPTICS_READ_MODEL_ID 0x3
46 #define SYNAPTICS_EXTENDED_QUERY 0x9
48 /* Magic numbers. */
49 #define SYNAPTICS_MIN_VERSION 45 /* 4.5 */
50 #define SYNAPTICS_MAGIC_BYTE 0x47
52 /* Capability bits. */
53 #define SYNAPTICS_CAP_EXTENDED (1 << 15)
54 #define SYNAPTICS_CAP_EXTNUM (1 << 14 | 1 << 13 | 1 << 12)
55 #define SYNAPTICS_CAP_MBUTTON (1 << 10)
56 #define SYNAPTICS_CAP_PASSTHROUGH (1 << 7)
57 #define SYNAPTICS_CAP_SLEEP (1 << 4)
58 #define SYNAPTICS_CAP_4BUTTON (1 << 3)
59 #define SYNAPTICS_CAP_MULTIDETECT (1 << 1)
60 #define SYNAPTICS_CAP_PALMDETECT (1 << 0)
62 /* Mode bits. */
63 #define SYNAPTICS_MODE_ABSOLUTE (1 << 7)
64 #define SYNAPTICS_MODE_RATE (1 << 6)
65 #define SYNAPTICS_MODE_SLEEP (1 << 3)
66 #define SYNAPTICS_MODE_GEST (1 << 2)
67 #define SYNAPTICS_MODE_W (1)
69 /* Extended mode button masks. */
70 #define SYN_1BUTMASK 0x1
71 #define SYN_2BUTMASK 0x1
73 /* Touchpad edge boundaries (Recommended values from Synaptics documentation) */
74 #define SYNAPTICS_EDGE_LEFT 1632
75 #define SYNAPTICS_EDGE_RIGHT 5312
76 #define SYNAPTICS_EDGE_TOP 4288
77 #define SYNAPTICS_EDGE_BOTTOM 1568
78 #define SYNAPTICS_EDGE_MAX 6143
80 /* Finger pressures */
81 #define SYNAPTICS_FINGER_NONE 0
82 #define SYNAPTICS_FINGER_HOVER 10
83 #define SYNAPTICS_FINGER_LIGHT 30
84 #define SYNAPTICS_FINGER_NORMAL 80
85 #define SYNAPTICS_FINGER_HEAVY 110
86 #define SYNAPTICS_FINGER_FLAT 200
87 #define SYNAPTICS_FINGER_PALM 255
89 /* Width values */
90 #define SYNAPTICS_WIDTH_TWO_FINGERS 0
91 #define SYNAPTICS_WIDTH_THREE_OR_MORE 1
92 #define SYNAPTICS_WIDTH_PEN 2
93 #define SYNAPTICS_WIDTH_FINGER_MIN 4
94 #define SYNAPTICS_WIDTH_FINGER_NORMAL 5
95 #define SYNAPTICS_WIDTH_FINGER_MAX 7
96 #define SYNAPTICS_WIDTH_PALM_MIN 8
97 #define SYNAPTICS_WIDTH_PALM_MAX 14
98 #define SYNAPTICS_WIDTH_MAX 15
100 #endif /* _DEV_PCKBCPORT_SYNAPTICSREG_H_ */