1#ifndef __HID_ROCCAT_KOVAPLUS_H
2#define __HID_ROCCAT_KOVAPLUS_H
3
4
5
6
7
8
9
10
11
12
13
14
15#include <linux/types.h>
16
17enum kovaplus_control_requests {
18
19 KOVAPLUS_CONTROL_REQUEST_PROFILE_SETTINGS = 0x10,
20
21 KOVAPLUS_CONTROL_REQUEST_PROFILE_BUTTONS = 0x20,
22};
23
24struct kovaplus_actual_profile {
25 uint8_t command;
26 uint8_t size;
27 uint8_t actual_profile;
28} __packed;
29
30struct kovaplus_profile_settings {
31 uint8_t command;
32 uint8_t size;
33 uint8_t profile_index;
34 uint8_t unknown1;
35 uint8_t sensitivity_x;
36 uint8_t sensitivity_y;
37 uint8_t cpi_levels_enabled;
38 uint8_t cpi_startup_level;
39 uint8_t data[8];
40} __packed;
41
42struct kovaplus_profile_buttons {
43 uint8_t command;
44 uint8_t size;
45 uint8_t profile_index;
46 uint8_t data[20];
47} __packed;
48
49struct kovaplus_info {
50 uint8_t command;
51 uint8_t size;
52 uint8_t firmware_version;
53 uint8_t unknown[3];
54} __packed;
55
56
57struct kovaplus_a {
58 uint8_t command;
59 uint8_t size;
60 uint8_t unknown;
61} __packed;
62
63enum kovaplus_commands {
64 KOVAPLUS_COMMAND_ACTUAL_PROFILE = 0x5,
65 KOVAPLUS_COMMAND_PROFILE_SETTINGS = 0x6,
66 KOVAPLUS_COMMAND_PROFILE_BUTTONS = 0x7,
67 KOVAPLUS_COMMAND_INFO = 0x9,
68 KOVAPLUS_COMMAND_A = 0xa,
69};
70
71enum kovaplus_mouse_report_numbers {
72 KOVAPLUS_MOUSE_REPORT_NUMBER_MOUSE = 1,
73 KOVAPLUS_MOUSE_REPORT_NUMBER_AUDIO = 2,
74 KOVAPLUS_MOUSE_REPORT_NUMBER_BUTTON = 3,
75 KOVAPLUS_MOUSE_REPORT_NUMBER_KBD = 4,
76};
77
78struct kovaplus_mouse_report_button {
79 uint8_t report_number;
80 uint8_t unknown1;
81 uint8_t type;
82 uint8_t data1;
83 uint8_t data2;
84} __packed;
85
86enum kovaplus_mouse_report_button_types {
87
88 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_PROFILE_1 = 0x20,
89
90 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_PROFILE_2 = 0x30,
91
92 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_MACRO = 0x40,
93
94 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_SHORTCUT = 0x50,
95
96 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_QUICKLAUNCH = 0x60,
97
98 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_TIMER = 0x80,
99
100 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_CPI = 0xb0,
101
102 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_SENSITIVITY = 0xc0,
103
104 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_MULTIMEDIA = 0xf0,
105};
106
107enum kovaplus_mouse_report_button_actions {
108 KOVAPLUS_MOUSE_REPORT_BUTTON_ACTION_PRESS = 0,
109 KOVAPLUS_MOUSE_REPORT_BUTTON_ACTION_RELEASE = 1,
110};
111
112struct kovaplus_roccat_report {
113 uint8_t type;
114 uint8_t profile;
115 uint8_t button;
116 uint8_t data1;
117 uint8_t data2;
118} __packed;
119
120struct kovaplus_device {
121 int actual_profile;
122 int actual_cpi;
123 int actual_x_sensitivity;
124 int actual_y_sensitivity;
125 int roccat_claimed;
126 int chrdev_minor;
127 struct mutex kovaplus_lock;
128 struct kovaplus_info info;
129 struct kovaplus_profile_settings profile_settings[5];
130 struct kovaplus_profile_buttons profile_buttons[5];
131};
132
133#endif
134