2
* Copyright 2010 by Red Hat, Inc.
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
/* packet length for individual models */
24
#define ISDV4_PKGLEN_TOUCH93 5
25
#define ISDV4_PKGLEN_TOUCH9A 7
26
#define ISDV4_PKGLEN_TPCPEN 9
27
#define ISDV4_PKGLEN_TPCCTL 11
28
#define ISDV4_PKGLEN_TOUCH2FG 13
30
#define HEADER_BIT 0x80
31
#define CONTROL_BIT 0x40
32
#define DATA_ID_MASK 0x3F
33
#define TOUCH_CONTROL_BIT 0x10
35
/* ISDV4 protocol parsing structs. */
37
/* Query reply data */
39
unsigned char data_id; /* always 00H */
42
uint16_t pressure_max;
48
/* Touch Query reply data */
50
uint8_t data_id; /* always 01H */
51
uint8_t panel_resolution;
55
uint8_t capacity_resolution;
57
} ISDV4TouchQueryReply;
59
/* Touch Data format. Note that capacity and finger2 are only set for some
60
* devices (0 on all others) */
62
uint8_t status; /* touch down/up */
67
uint8_t status; /* touch down/up */
73
/* Coordinate data format */
75
uint8_t proximity; /* in proximity? */
76
uint8_t tip; /* tip/eraser pressed? */
77
uint8_t side; /* side switch pressed? */
78
uint8_t eraser; /* eraser pressed? */
84
} ISDV4CoordinateData;
86
#endif /* WCMISDV4_H */
88
/* vim: set noexpandtab shiftwidth=8: */