Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
hid-roccat-pyra.h
Go to the documentation of this file.
1 #ifndef __HID_ROCCAT_PYRA_H
2 #define __HID_ROCCAT_PYRA_H
3 
4 /*
5  * Copyright (c) 2010 Stefan Achatz <[email protected]>
6  */
7 
8 /*
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU General Public License as published by the Free
11  * Software Foundation; either version 2 of the License, or (at your option)
12  * any later version.
13  */
14 
15 #include <linux/types.h>
16 
17 struct pyra_b {
18  uint8_t command; /* PYRA_COMMAND_B */
19  uint8_t size; /* always 3 */
20  uint8_t unknown; /* 1 */
21 } __attribute__ ((__packed__));
22 
26 };
27 
28 struct pyra_settings {
29  uint8_t command; /* PYRA_COMMAND_SETTINGS */
30  uint8_t size; /* always 3 */
31  uint8_t startup_profile; /* Range 0-4! */
32 } __attribute__ ((__packed__));
33 
35  uint8_t command; /* PYRA_COMMAND_PROFILE_SETTINGS */
36  uint8_t size; /* always 0xd */
37  uint8_t number; /* Range 0-4 */
39  uint8_t x_sensitivity; /* 0x1-0xa */
41  uint8_t x_cpi; /* unused */
42  uint8_t y_cpi; /* this value is for x and y */
43  uint8_t lightswitch; /* 0 = off, 1 = on */
46  uint16_t checksum; /* byte sum */
47 } __attribute__ ((__packed__));
48 
50  uint8_t command; /* PYRA_COMMAND_PROFILE_BUTTONS */
51  uint8_t size; /* always 0x13 */
52  uint8_t number; /* Range 0-4 */
54  uint16_t checksum; /* byte sum */
55 } __attribute__ ((__packed__));
56 
57 struct pyra_info {
58  uint8_t command; /* PYRA_COMMAND_INFO */
59  uint8_t size; /* always 6 */
61  uint8_t unknown1; /* always 0 */
62  uint8_t unknown2; /* always 1 */
63  uint8_t unknown3; /* always 0 */
64 } __attribute__ ((__packed__));
65 
72 };
73 
78 };
79 
81  uint8_t report_number; /* always 3 */
82  uint8_t unknown; /* always 0 */
86 } __attribute__ ((__packed__));
87 
89  uint8_t report_number; /* always 2 */
91  uint8_t unused; /* always 0 */
92 } __attribute__ ((__packed__));
93 
94 /* hid audio controls */
99 };
100 
102  /*
103  * Mouse sends tilt events on report_number 1 and 3
104  * Tilt events are sent repeatedly with 0.94s between first and second
105  * event and 0.22s on subsequent
106  */
108 
109  /*
110  * These are sent sequentially
111  * data1 contains new profile number in range 1-5
112  */
115 
116  /*
117  * data1 = button_number (rmp index)
118  * data2 = pressed/released
119  */
122 
123  /*
124  * data1 = button_number (rmp index)
125  */
127 
128  /* data1 = new cpi */
130 
131  /* data1 and data2 = new sensitivity */
133 
135 };
136 
137 enum {
140 };
141 
146 } __attribute__ ((__packed__));
147 
148 struct pyra_device {
154  struct mutex pyra_lock;
158 };
159 
160 #endif