aboutsummaryrefslogtreecommitdiff
path: root/hid-tminit.h
diff options
context:
space:
mode:
authorDario Pagani <dariopag45@gmail.com>2020-08-16 12:05:48 +0200
committerGitHub <noreply@github.com>2020-08-16 12:05:48 +0200
commit6c41e8fb0f5a73b1dd45685a9da5818679f8524f (patch)
treef5991273670ff706bfd40b1f41174fc589f03c52 /hid-tminit.h
parent16bfd88198de32bd747fcc0d2f029890994c3d8d (diff)
parentd1835027f64168b78e126944c1b84ce846084d99 (diff)
downloadhid-tminit-6c41e8fb0f5a73b1dd45685a9da5818679f8524f.tar.gz
hid-tminit-6c41e8fb0f5a73b1dd45685a9da5818679f8524f.zip
Merge pull request #1 from Kimplul/panicfix
fix for kernel panic when initializing T300RS on some setups
Diffstat (limited to 'hid-tminit.h')
-rw-r--r--hid-tminit.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/hid-tminit.h b/hid-tminit.h
index 820ca86..c8b664e 100644
--- a/hid-tminit.h
+++ b/hid-tminit.h
@@ -1,4 +1,21 @@
/**
+ * These interrupts are used to prevent a nasty crash when initializing the
+ * T300RS. Used in tminit_interrupts().
+ */
+u8 setup_0[] = { 0x42, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+u8 setup_1[] = { 0x0a, 0x04, 0x90, 0x03, 0x00, 0x00, 0x00, 0x00 };
+u8 setup_2[] = { 0x0a, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00 };
+u8 setup_3[] = { 0x0a, 0x04, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00 };
+u8 setup_4[] = { 0x0a, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00 };
+u8 *setup_arr[] = { setup_0, setup_1, setup_2, setup_3, setup_4 };
+unsigned int setup_arr_sizes[] = {
+ ARRAY_SIZE(setup_0),
+ ARRAY_SIZE(setup_1),
+ ARRAY_SIZE(setup_2),
+ ARRAY_SIZE(setup_3),
+ ARRAY_SIZE(setup_4)
+};
+/**
* This struct contains for each type of
* Thrustmaster wheel
*