1
0
forked from drath/libratbag

hidpp20: document the names of the features in gaming mice

This patch adds nothing but some debug outputs and prepares the code
to support the recent gaming mice from Logitech.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
Benjamin Tissoires
2015-10-11 10:28:37 -04:00
parent 4abdb634cf
commit d9645c0e4b
3 changed files with 47 additions and 3 deletions

View File

@@ -399,6 +399,22 @@ hidpp20drv_init_feature(struct ratbag_device *device, uint16_t feature)
device->num_buttons = drv_data->num_controls;
break;
}
case HIDPP_PAGE_ADJUSTABLE_REPORT_RATE: {
log_debug(ratbag, "device has adjustable report rate\n");
break;
}
case HIDPP_PAGE_COLOR_LED_EFFECTS: {
log_debug(ratbag, "device has color effects\n");
break;
}
case HIDPP_PAGE_ONBOARD_PROFILES: {
log_debug(ratbag, "device has onboard profiles\n");
break;
}
case HIDPP_PAGE_MOUSE_BUTTON_SPY: {
log_debug(ratbag, "device has configurable mouse button spy\n");
break;
}
default:
log_raw(device->ratbag, "unknown feature 0x%04x\n", feature);
}

View File

@@ -53,11 +53,15 @@ hidpp20_feature_get_name(uint16_t feature)
CASE_RETURN_STRING(HIDPP_PAGE_ROOT);
CASE_RETURN_STRING(HIDPP_PAGE_FEATURE_SET);
CASE_RETURN_STRING(HIDPP_PAGE_DEVICE_INFO);
CASE_RETURN_STRING(HIDPP_PAGE_MOUSE_POINTER_BASIC);
CASE_RETURN_STRING(HIDPP_PAGE_ADJUSTABLE_DPI);
CASE_RETURN_STRING(HIDPP_PAGE_SPECIAL_KEYS_BUTTONS);
CASE_RETURN_STRING(HIDPP_PAGE_BATTERY_LEVEL_STATUS);
CASE_RETURN_STRING(HIDPP_PAGE_KBD_REPROGRAMMABLE_KEYS);
CASE_RETURN_STRING(HIDPP_PAGE_SPECIAL_KEYS_BUTTONS);
CASE_RETURN_STRING(HIDPP_PAGE_MOUSE_POINTER_BASIC);
CASE_RETURN_STRING(HIDPP_PAGE_ADJUSTABLE_DPI);
CASE_RETURN_STRING(HIDPP_PAGE_ADJUSTABLE_REPORT_RATE);
CASE_RETURN_STRING(HIDPP_PAGE_COLOR_LED_EFFECTS);
CASE_RETURN_STRING(HIDPP_PAGE_ONBOARD_PROFILES);
CASE_RETURN_STRING(HIDPP_PAGE_MOUSE_BUTTON_SPY);
default:
sprintf(numeric, "%#4x", feature);
str = numeric;

View File

@@ -237,4 +237,28 @@ int hidpp20_adjustable_dpi_get_sensors(struct ratbag_device *device,
int hidpp20_adjustable_dpi_set_sensor_dpi(struct ratbag_device *device,
struct hidpp20_sensor *sensor, uint16_t dpi);
/* -------------------------------------------------------------------------- */
/* 0x8060 - Adjustable Report Rate */
/* -------------------------------------------------------------------------- */
#define HIDPP_PAGE_ADJUSTABLE_REPORT_RATE 0x8060
/* -------------------------------------------------------------------------- */
/* 0x8070v4 - Color LED effects */
/* -------------------------------------------------------------------------- */
#define HIDPP_PAGE_COLOR_LED_EFFECTS 0x8070
/* -------------------------------------------------------------------------- */
/* 0x8100 - Onboard Profiles */
/* -------------------------------------------------------------------------- */
#define HIDPP_PAGE_ONBOARD_PROFILES 0x8100
/* -------------------------------------------------------------------------- */
/* 0x8110 - Mouse Button Spy */
/* -------------------------------------------------------------------------- */
#define HIDPP_PAGE_MOUSE_BUTTON_SPY 0x8110
#endif /* HIDPP_20_H */