Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
hid-roccat-koneplus.h
Go to the documentation of this file.
1 #ifndef __HID_ROCCAT_KONEPLUS_H
2 #define __HID_ROCCAT_KONEPLUS_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 koneplus_talk {
18  uint8_t command; /* KONEPLUS_COMMAND_TALK */
19  uint8_t size; /* always 0x10 */
21 } __packed;
22 
26 };
27 
29  uint8_t command; /* KONEPLUS_COMMAND_ACTUAL_PROFILE */
30  uint8_t size; /* always 3 */
31  uint8_t actual_profile; /* Range 0-4! */
32 } __attribute__ ((__packed__));
33 
35  uint8_t command; /* KONEPLUS_COMMAND_PROFILE_SETTINGS */
36  uint8_t size; /* always 43 */
37  uint8_t number; /* range 0-4 */
43  uint8_t cpi_startup_level; /* range 0-4 */
44  uint8_t cpi_levels_y[5]; /* range 1-60 means 100-6000 cpi */
54 } __attribute__ ((__packed__));
55 
57  uint8_t command; /* KONEPLUS_COMMAND_PROFILE_BUTTONS */
58  uint8_t size; /* always 77 */
59  uint8_t number; /* range 0-4 */
62 } __attribute__ ((__packed__));
63 
65  uint8_t command; /* KONEPLUS_COMMAND_MACRO */
66  uint16_t size; /* always 0x822 little endian */
67  uint8_t profile; /* range 0-4 */
68  uint8_t button; /* range 0-23 */
69  uint8_t data[2075];
71 } __attribute__ ((__packed__));
72 
73 struct koneplus_info {
74  uint8_t command; /* KONEPLUS_COMMAND_INFO */
75  uint8_t size; /* always 6 */
78 } __attribute__ ((__packed__));
79 
80 struct koneplus_e {
81  uint8_t command; /* KONEPLUS_COMMAND_E */
82  uint8_t size; /* always 3 */
83  uint8_t unknown; /* TODO 1; 0 before firmware update */
84 } __attribute__ ((__packed__));
85 
87  uint8_t command; /* KONEPLUS_COMMAND_SENSOR */
88  uint8_t size; /* always 6 */
90 } __attribute__ ((__packed__));
91 
93  uint8_t command; /* KONEPLUS_COMMAND_FIRMWARE_WRITE */
95 } __attribute__ ((__packed__));
96 
98  uint8_t command; /* KONEPLUS_COMMAND_FIRMWARE_WRITE_CONTROL */
99  /*
100  * value is 1 on success
101  * 3 means "not finished yet"
102  */
104  uint8_t unknown; /* always 0x75 */
105 } __attribute__ ((__packed__));
106 
107 struct koneplus_tcu {
108  uint16_t usb_command; /* KONEPLUS_USB_COMMAND_TCU */
110 } __attribute__ ((__packed__));
113  uint16_t usb_command; /* KONEPLUS_USB_COMMAND_TCU */
114  uint8_t data[1024];
116 } __attribute__ ((__packed__));
117 
130 };
131 
136 };
137 
139  uint8_t report_number; /* always KONEPLUS_MOUSE_REPORT_NUMBER_BUTTON */
146 } __attribute__ ((__packed__));
149  /* data1 = new profile range 1-5 */
152  /* data1 = button number range 1-24; data2 = action */
154 
155  /* data1 = button number range 1-24; data2 = action */
157 
158  /* data1 = setting number range 1-5 */
160 
161  /* data1 and data2 = range 0x1-0xb */
163 
164  /* data1 = 22 = next track...
165  * data2 = action
166  */
169 };
170 
174 };
175 
181 } __attribute__ ((__packed__));
182 
185 
188 
190 
194 };
195 
196 #endif