1
2
3
4
5
6
7
8
9#ifndef WACOM_WAC_H
10#define WACOM_WAC_H
11
12#include <linux/types.h>
13
14
15#define WACOM_PKGLEN_MAX 192
16
17#define WACOM_NAME_MAX 64
18
19
20#define WACOM_PKGLEN_PENPRTN 7
21#define WACOM_PKGLEN_GRAPHIRE 8
22#define WACOM_PKGLEN_BBFUN 9
23#define WACOM_PKGLEN_INTUOS 10
24#define WACOM_PKGLEN_TPC1FG 5
25#define WACOM_PKGLEN_TPC2FG 14
26#define WACOM_PKGLEN_BBTOUCH 20
27#define WACOM_PKGLEN_BBTOUCH3 64
28#define WACOM_PKGLEN_BBPEN 10
29#define WACOM_PKGLEN_WIRELESS 32
30#define WACOM_PKGLEN_MTOUCH 62
31#define WACOM_PKGLEN_MTTPC 40
32#define WACOM_REPORT_CINTIQ 16
33#define WACOM_REPORT_CINTIQPAD 17
34
35
36#define WACOM_BYTES_PER_MT_PACKET 11
37#define WACOM_BYTES_PER_24HDT_PACKET 14
38#define WACOM_BYTES_PER_QHDTHID_PACKET 6
39
40
41#define STYLUS_DEVICE_ID 0x02
42#define TOUCH_DEVICE_ID 0x03
43#define CURSOR_DEVICE_ID 0x06
44#define ERASER_DEVICE_ID 0x0A
45#define PAD_DEVICE_ID 0x0F
46
47
48#define WACOM_REPORT_PENABLED 2
49#define WACOM_REPORT_INTUOSREAD 5
50#define WACOM_REPORT_INTUOSWRITE 6
51#define WACOM_REPORT_INTUOSPAD 12
52#define WACOM_REPORT_INTUOS5PAD 3
53#define WACOM_REPORT_TPC1FG 6
54#define WACOM_REPORT_TPC2FG 13
55#define WACOM_REPORT_TPCMT 13
56#define WACOM_REPORT_TPCHID 15
57#define WACOM_REPORT_TPCST 16
58#define WACOM_REPORT_TPC1FGE 18
59#define WACOM_REPORT_24HDT 1
60
61
62#define WACOM_QUIRK_MULTI_INPUT 0x0001
63#define WACOM_QUIRK_BBTOUCH_LOWRES 0x0002
64#define WACOM_QUIRK_NO_INPUT 0x0004
65#define WACOM_QUIRK_MONITOR 0x0008
66
67enum {
68 PENPARTNER = 0,
69 GRAPHIRE,
70 WACOM_G4,
71 PTU,
72 PL,
73 DTU,
74 INTUOS,
75 INTUOS3S,
76 INTUOS3,
77 INTUOS3L,
78 INTUOS4S,
79 INTUOS4,
80 INTUOS4L,
81 INTUOS5S,
82 INTUOS5,
83 INTUOS5L,
84 INTUOSPS,
85 INTUOSPM,
86 INTUOSPL,
87 WACOM_21UX2,
88 WACOM_22HD,
89 DTK,
90 WACOM_24HD,
91 WACOM_27QHD,
92 CINTIQ,
93 WACOM_BEE,
94 WACOM_13HD,
95 WACOM_MO,
96 WIRELESS,
97 BAMBOO_PT,
98 WACOM_24HDT,
99 WACOM_27QHDT,
100 TABLETPC,
101 TABLETPCE,
102 TABLETPC2FG,
103 MTSCREEN,
104 MTTPC,
105 MAX_TYPE
106};
107
108struct wacom_features {
109 const char *name;
110 int pktlen;
111 int x_max;
112 int y_max;
113 int pressure_max;
114 int distance_max;
115 int type;
116 int x_resolution;
117 int y_resolution;
118 int x_min;
119 int y_min;
120 int device_type;
121 int x_phy;
122 int y_phy;
123 unsigned char unit;
124 unsigned char unitExpo;
125 int x_fuzz;
126 int y_fuzz;
127 int pressure_fuzz;
128 int distance_fuzz;
129 unsigned quirks;
130 unsigned touch_max;
131 int oVid;
132 int oPid;
133};
134
135struct wacom_shared {
136 bool stylus_in_proximity;
137 bool touch_down;
138};
139
140struct wacom_wac {
141 char name[WACOM_NAME_MAX];
142 unsigned char *data;
143 int tool[2];
144 int id[2];
145 __u32 serial[2];
146 struct wacom_features features;
147 struct wacom_shared *shared;
148 struct input_dev *input;
149 int pid;
150 int battery_capacity;
151 int num_contacts_left;
152};
153
154#endif
155