aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-roccat-pyra.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-roccat-pyra.h')
-rw-r--r--drivers/hid/hid-roccat-pyra.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/hid/hid-roccat-pyra.h b/drivers/hid/hid-roccat-pyra.h
index 22f80a8f26f9..14cbbe1621e0 100644
--- a/drivers/hid/hid-roccat-pyra.h
+++ b/drivers/hid/hid-roccat-pyra.h
@@ -14,14 +14,11 @@
14 14
15#include <linux/types.h> 15#include <linux/types.h>
16 16
17#pragma pack(push)
18#pragma pack(1)
19
20struct pyra_b { 17struct pyra_b {
21 uint8_t command; /* PYRA_COMMAND_B */ 18 uint8_t command; /* PYRA_COMMAND_B */
22 uint8_t size; /* always 3 */ 19 uint8_t size; /* always 3 */
23 uint8_t unknown; /* 1 */ 20 uint8_t unknown; /* 1 */
24}; 21} __attribute__ ((__packed__));
25 22
26struct pyra_control { 23struct pyra_control {
27 uint8_t command; /* PYRA_COMMAND_CONTROL */ 24 uint8_t command; /* PYRA_COMMAND_CONTROL */
@@ -31,7 +28,7 @@ struct pyra_control {
31 */ 28 */
32 uint8_t value; /* Range 0-4 */ 29 uint8_t value; /* Range 0-4 */
33 uint8_t request; 30 uint8_t request;
34}; 31} __attribute__ ((__packed__));
35 32
36enum pyra_control_requests { 33enum pyra_control_requests {
37 PYRA_CONTROL_REQUEST_STATUS = 0x00, 34 PYRA_CONTROL_REQUEST_STATUS = 0x00,
@@ -43,7 +40,7 @@ struct pyra_settings {
43 uint8_t command; /* PYRA_COMMAND_SETTINGS */ 40 uint8_t command; /* PYRA_COMMAND_SETTINGS */
44 uint8_t size; /* always 3 */ 41 uint8_t size; /* always 3 */
45 uint8_t startup_profile; /* Range 0-4! */ 42 uint8_t startup_profile; /* Range 0-4! */
46}; 43} __attribute__ ((__packed__));
47 44
48struct pyra_profile_settings { 45struct pyra_profile_settings {
49 uint8_t command; /* PYRA_COMMAND_PROFILE_SETTINGS */ 46 uint8_t command; /* PYRA_COMMAND_PROFILE_SETTINGS */
@@ -58,7 +55,7 @@ struct pyra_profile_settings {
58 uint8_t light_effect; 55 uint8_t light_effect;
59 uint8_t handedness; 56 uint8_t handedness;
60 uint16_t checksum; /* byte sum */ 57 uint16_t checksum; /* byte sum */
61}; 58} __attribute__ ((__packed__));
62 59
63struct pyra_profile_buttons { 60struct pyra_profile_buttons {
64 uint8_t command; /* PYRA_COMMAND_PROFILE_BUTTONS */ 61 uint8_t command; /* PYRA_COMMAND_PROFILE_BUTTONS */
@@ -66,7 +63,7 @@ struct pyra_profile_buttons {
66 uint8_t number; /* Range 0-4 */ 63 uint8_t number; /* Range 0-4 */
67 uint8_t buttons[14]; 64 uint8_t buttons[14];
68 uint16_t checksum; /* byte sum */ 65 uint16_t checksum; /* byte sum */
69}; 66} __attribute__ ((__packed__));
70 67
71struct pyra_info { 68struct pyra_info {
72 uint8_t command; /* PYRA_COMMAND_INFO */ 69 uint8_t command; /* PYRA_COMMAND_INFO */
@@ -75,7 +72,7 @@ struct pyra_info {
75 uint8_t unknown1; /* always 0 */ 72 uint8_t unknown1; /* always 0 */
76 uint8_t unknown2; /* always 1 */ 73 uint8_t unknown2; /* always 1 */
77 uint8_t unknown3; /* always 0 */ 74 uint8_t unknown3; /* always 0 */
78}; 75} __attribute__ ((__packed__));
79 76
80enum pyra_commands { 77enum pyra_commands {
81 PYRA_COMMAND_CONTROL = 0x4, 78 PYRA_COMMAND_CONTROL = 0x4,
@@ -107,13 +104,13 @@ struct pyra_mouse_event_button {
107 uint8_t type; 104 uint8_t type;
108 uint8_t data1; 105 uint8_t data1;
109 uint8_t data2; 106 uint8_t data2;
110}; 107} __attribute__ ((__packed__));
111 108
112struct pyra_mouse_event_audio { 109struct pyra_mouse_event_audio {
113 uint8_t report_number; /* always 2 */ 110 uint8_t report_number; /* always 2 */
114 uint8_t type; 111 uint8_t type;
115 uint8_t unused; /* always 0 */ 112 uint8_t unused; /* always 0 */
116}; 113} __attribute__ ((__packed__));
117 114
118/* hid audio controls */ 115/* hid audio controls */
119enum pyra_mouse_event_audio_types { 116enum pyra_mouse_event_audio_types {
@@ -167,9 +164,7 @@ struct pyra_roccat_report {
167 uint8_t type; 164 uint8_t type;
168 uint8_t value; 165 uint8_t value;
169 uint8_t key; 166 uint8_t key;
170}; 167} __attribute__ ((__packed__));
171
172#pragma pack(pop)
173 168
174struct pyra_device { 169struct pyra_device {
175 int actual_profile; 170 int actual_profile;