0001
0002 #ifndef __HID_ROCCAT_KOVAPLUS_H
0003 #define __HID_ROCCAT_KOVAPLUS_H
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <linux/types.h>
0013
0014 enum {
0015 KOVAPLUS_SIZE_CONTROL = 0x03,
0016 KOVAPLUS_SIZE_INFO = 0x06,
0017 KOVAPLUS_SIZE_PROFILE_SETTINGS = 0x10,
0018 KOVAPLUS_SIZE_PROFILE_BUTTONS = 0x17,
0019 };
0020
0021 enum kovaplus_control_requests {
0022
0023 KOVAPLUS_CONTROL_REQUEST_PROFILE_SETTINGS = 0x10,
0024
0025 KOVAPLUS_CONTROL_REQUEST_PROFILE_BUTTONS = 0x20,
0026 };
0027
0028 struct kovaplus_actual_profile {
0029 uint8_t command;
0030 uint8_t size;
0031 uint8_t actual_profile;
0032 } __packed;
0033
0034 struct kovaplus_profile_settings {
0035 uint8_t command;
0036 uint8_t size;
0037 uint8_t profile_index;
0038 uint8_t unknown1;
0039 uint8_t sensitivity_x;
0040 uint8_t sensitivity_y;
0041 uint8_t cpi_levels_enabled;
0042 uint8_t cpi_startup_level;
0043 uint8_t data[8];
0044 } __packed;
0045
0046 struct kovaplus_profile_buttons {
0047 uint8_t command;
0048 uint8_t size;
0049 uint8_t profile_index;
0050 uint8_t data[20];
0051 } __packed;
0052
0053 struct kovaplus_info {
0054 uint8_t command;
0055 uint8_t size;
0056 uint8_t firmware_version;
0057 uint8_t unknown[3];
0058 } __packed;
0059
0060 enum kovaplus_commands {
0061 KOVAPLUS_COMMAND_ACTUAL_PROFILE = 0x5,
0062 KOVAPLUS_COMMAND_CONTROL = 0x4,
0063 KOVAPLUS_COMMAND_PROFILE_SETTINGS = 0x6,
0064 KOVAPLUS_COMMAND_PROFILE_BUTTONS = 0x7,
0065 KOVAPLUS_COMMAND_INFO = 0x9,
0066 KOVAPLUS_COMMAND_A = 0xa,
0067 };
0068
0069 enum kovaplus_mouse_report_numbers {
0070 KOVAPLUS_MOUSE_REPORT_NUMBER_MOUSE = 1,
0071 KOVAPLUS_MOUSE_REPORT_NUMBER_AUDIO = 2,
0072 KOVAPLUS_MOUSE_REPORT_NUMBER_BUTTON = 3,
0073 KOVAPLUS_MOUSE_REPORT_NUMBER_KBD = 4,
0074 };
0075
0076 struct kovaplus_mouse_report_button {
0077 uint8_t report_number;
0078 uint8_t unknown1;
0079 uint8_t type;
0080 uint8_t data1;
0081 uint8_t data2;
0082 } __packed;
0083
0084 enum kovaplus_mouse_report_button_types {
0085
0086 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_PROFILE_1 = 0x20,
0087
0088 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_PROFILE_2 = 0x30,
0089
0090 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_MACRO = 0x40,
0091
0092 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_SHORTCUT = 0x50,
0093
0094 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_QUICKLAUNCH = 0x60,
0095
0096 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_TIMER = 0x80,
0097
0098 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_CPI = 0xb0,
0099
0100 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_SENSITIVITY = 0xc0,
0101
0102 KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_MULTIMEDIA = 0xf0,
0103 };
0104
0105 enum kovaplus_mouse_report_button_actions {
0106 KOVAPLUS_MOUSE_REPORT_BUTTON_ACTION_PRESS = 0,
0107 KOVAPLUS_MOUSE_REPORT_BUTTON_ACTION_RELEASE = 1,
0108 };
0109
0110 struct kovaplus_roccat_report {
0111 uint8_t type;
0112 uint8_t profile;
0113 uint8_t button;
0114 uint8_t data1;
0115 uint8_t data2;
0116 } __packed;
0117
0118 struct kovaplus_device {
0119 int actual_profile;
0120 int actual_cpi;
0121 int actual_x_sensitivity;
0122 int actual_y_sensitivity;
0123 int roccat_claimed;
0124 int chrdev_minor;
0125 struct mutex kovaplus_lock;
0126 struct kovaplus_profile_settings profile_settings[5];
0127 struct kovaplus_profile_buttons profile_buttons[5];
0128 };
0129
0130 #endif