-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinputattach.patch
78 lines (75 loc) · 2.71 KB
/
inputattach.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
diff -rupN linuxconsoletools-1.4.1-original/inputattach.patch linuxconsoletools-1.4.1/inputattach.patch
--- linuxconsoletools-1.4.1-original/inputattach.patch 1970-01-01 01:00:00.000000000 +0100
+++ linuxconsoletools-1.4.1/inputattach.patch 2011-07-11 12:06:30.331999922 +0200
@@ -0,0 +1,25 @@
+diff -u joystick-1.4.1/utils/inputattach.c joystick-patched/utils/inputattach.c
+--- joystick-1.4.1/utils/inputattach.c 2011-06-25 09:16:58.000000000 -0400
++++ joystick-patched/utils/inputattach.c 2011-07-01 13:48:15.000000000 -0400
+@@ -588,6 +588,9 @@
+ { "--w8001", "-w8001", "Wacom W8001",
+ B38400, CS8,
+ SERIO_W8001, 0x00, 0x00, 0, NULL },
++{ "--wacom_iv", "-wacom_iv", "Wacom protocol 4 tablet",
++ B9600, CS8,
++ SERIO_WACOM_IV, 0x00, 0x00, 0, NULL },
+ { NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL }
+ };
+
+diff -u joystick-1.4.1/utils/serio-ids.h joystick-patched/utils/serio-ids.h
+--- joystick-1.4.1/utils/serio-ids.h 2010-11-04 02:15:02.000000000 -0400
++++ joystick-patched/utils/serio-ids.h 2011-07-01 13:48:33.000000000 -0400
+@@ -125,5 +125,8 @@
+ #ifndef SERIO_PSMULT
+ # define SERIO_PS2MULT 0x3c
+ #endif
++#ifndef SERIO_WACOM_IV
++# define SERIO_WACOM_IV 0x3d
++#endif
+
+ #endif
diff -rupN linuxconsoletools-1.4.1-original/utils/inputattach.c linuxconsoletools-1.4.1/utils/inputattach.c
--- linuxconsoletools-1.4.1-original/utils/inputattach.c 2011-06-25 15:16:58.000000000 +0200
+++ linuxconsoletools-1.4.1/utils/inputattach.c 2011-07-13 13:15:37.231000078 +0200
@@ -459,6 +459,17 @@ static int dump_init(int fd, unsigned lo
}
}
+static int wacom_v_init(int fd, unsigned long *id, unsigned long *extra)
+{
+ if (write(fd, "BA19\r", 5) != 5)
+ return -1;
+
+ usleep(100 * 1000);
+
+ setline(fd, CS8, B19200);
+ return 0;
+}
+
struct input_types {
const char *name;
const char *name2;
@@ -588,6 +599,12 @@ static struct input_types input_types[]
{ "--w8001", "-w8001", "Wacom W8001",
B38400, CS8,
SERIO_W8001, 0x00, 0x00, 0, NULL },
+{ "--wacom_iv", "-wacom_iv", "Wacom protocol 4 tablet",
+ B9600, CS8,
+ SERIO_WACOM_IV, 0x00, 0x00, 0, NULL },
+{ "--wacom_v", "-wacom_v", "Wacom protocol 5 tablet",
+ B9600, CS8,
+ SERIO_WACOM_V, 0x00, 0x00, 0, wacom_v_init },
{ NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL }
};
diff -rupN linuxconsoletools-1.4.1-original/utils/serio-ids.h linuxconsoletools-1.4.1/utils/serio-ids.h
--- linuxconsoletools-1.4.1-original/utils/serio-ids.h 2010-11-04 07:15:02.000000000 +0100
+++ linuxconsoletools-1.4.1/utils/serio-ids.h 2011-07-13 13:11:55.223000078 +0200
@@ -125,5 +125,11 @@
#ifndef SERIO_PSMULT
# define SERIO_PS2MULT 0x3c
#endif
+#ifndef SERIO_WACOM_IV
+# define SERIO_WACOM_IV 0x3d
+#endif
+#ifndef SERIO_WACOM_V
+# define SERIO_WACOM_V 0x3e
+#endif
#endif