diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /drivers/hid/hid-roccat-pyra.h | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'drivers/hid/hid-roccat-pyra.h')
-rw-r--r-- | drivers/hid/hid-roccat-pyra.h | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/drivers/hid/hid-roccat-pyra.h b/drivers/hid/hid-roccat-pyra.h index beedcf001ce..0442d7fa2dc 100644 --- a/drivers/hid/hid-roccat-pyra.h +++ b/drivers/hid/hid-roccat-pyra.h | |||
@@ -14,15 +14,24 @@ | |||
14 | 14 | ||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | 16 | ||
17 | enum { | 17 | struct pyra_b { |
18 | PYRA_SIZE_CONTROL = 0x03, | 18 | uint8_t command; /* PYRA_COMMAND_B */ |
19 | PYRA_SIZE_INFO = 0x06, | 19 | uint8_t size; /* always 3 */ |
20 | PYRA_SIZE_PROFILE_SETTINGS = 0x0d, | 20 | uint8_t unknown; /* 1 */ |
21 | PYRA_SIZE_PROFILE_BUTTONS = 0x13, | 21 | } __attribute__ ((__packed__)); |
22 | PYRA_SIZE_SETTINGS = 0x03, | 22 | |
23 | }; | 23 | struct pyra_control { |
24 | uint8_t command; /* PYRA_COMMAND_CONTROL */ | ||
25 | /* | ||
26 | * value is profile number for request_settings and request_buttons | ||
27 | * 1 if status ok for request_status | ||
28 | */ | ||
29 | uint8_t value; /* Range 0-4 */ | ||
30 | uint8_t request; | ||
31 | } __attribute__ ((__packed__)); | ||
24 | 32 | ||
25 | enum pyra_control_requests { | 33 | enum pyra_control_requests { |
34 | PYRA_CONTROL_REQUEST_STATUS = 0x00, | ||
26 | PYRA_CONTROL_REQUEST_PROFILE_SETTINGS = 0x10, | 35 | PYRA_CONTROL_REQUEST_PROFILE_SETTINGS = 0x10, |
27 | PYRA_CONTROL_REQUEST_PROFILE_BUTTONS = 0x20 | 36 | PYRA_CONTROL_REQUEST_PROFILE_BUTTONS = 0x20 |
28 | }; | 37 | }; |
@@ -48,6 +57,14 @@ struct pyra_profile_settings { | |||
48 | uint16_t checksum; /* byte sum */ | 57 | uint16_t checksum; /* byte sum */ |
49 | } __attribute__ ((__packed__)); | 58 | } __attribute__ ((__packed__)); |
50 | 59 | ||
60 | struct pyra_profile_buttons { | ||
61 | uint8_t command; /* PYRA_COMMAND_PROFILE_BUTTONS */ | ||
62 | uint8_t size; /* always 0x13 */ | ||
63 | uint8_t number; /* Range 0-4 */ | ||
64 | uint8_t buttons[14]; | ||
65 | uint16_t checksum; /* byte sum */ | ||
66 | } __attribute__ ((__packed__)); | ||
67 | |||
51 | struct pyra_info { | 68 | struct pyra_info { |
52 | uint8_t command; /* PYRA_COMMAND_INFO */ | 69 | uint8_t command; /* PYRA_COMMAND_INFO */ |
53 | uint8_t size; /* always 6 */ | 70 | uint8_t size; /* always 6 */ |
@@ -143,10 +160,13 @@ struct pyra_roccat_report { | |||
143 | struct pyra_device { | 160 | struct pyra_device { |
144 | int actual_profile; | 161 | int actual_profile; |
145 | int actual_cpi; | 162 | int actual_cpi; |
163 | int firmware_version; | ||
146 | int roccat_claimed; | 164 | int roccat_claimed; |
147 | int chrdev_minor; | 165 | int chrdev_minor; |
148 | struct mutex pyra_lock; | 166 | struct mutex pyra_lock; |
167 | struct pyra_settings settings; | ||
149 | struct pyra_profile_settings profile_settings[5]; | 168 | struct pyra_profile_settings profile_settings[5]; |
169 | struct pyra_profile_buttons profile_buttons[5]; | ||
150 | }; | 170 | }; |
151 | 171 | ||
152 | #endif | 172 | #endif |