hidpp20: add 3 new feature constants

Add HIDPP_PAGE_RESET, HIDPP_PAGE_DEVICE_NAME, and
HIDPP_PAGE_WIRELESS_DEVICE_STATUS. These feature names are found in the
"features.xml" of an LogiOptions installation. Probably not very useful
for now.
This commit is contained in:
Haochen Tong
2018-11-27 01:37:38 +01:00
parent 97306ddd5a
commit 53ba4d975d
2 changed files with 21 additions and 0 deletions

View File

@@ -55,9 +55,12 @@ 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_DEVICE_NAME);
CASE_RETURN_STRING(HIDPP_PAGE_RESET);
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_WIRELESS_DEVICE_STATUS);
CASE_RETURN_STRING(HIDPP_PAGE_MOUSE_POINTER_BASIC);
CASE_RETURN_STRING(HIDPP_PAGE_ADJUSTABLE_DPI);
CASE_RETURN_STRING(HIDPP_PAGE_ADJUSTABLE_REPORT_RATE);

View File

@@ -100,6 +100,18 @@ int hidpp20_root_get_protocol_version(struct hidpp20_device *dev,
#define HIDPP_PAGE_DEVICE_INFO 0x0003
/* -------------------------------------------------------------------------- */
/* 0x0005: Device Name */
/* -------------------------------------------------------------------------- */
#define HIDPP_PAGE_DEVICE_NAME 0x0005
/* -------------------------------------------------------------------------- */
/* 0x0020: Reset */
/* -------------------------------------------------------------------------- */
#define HIDPP_PAGE_RESET 0x0020
/* -------------------------------------------------------------------------- */
/* 0x1000: Battery level status */
/* -------------------------------------------------------------------------- */
@@ -316,6 +328,12 @@ const char *hidpp20_1b04_get_logical_mapping_name(uint16_t value);
enum ratbag_button_type hidpp20_1b04_get_physical_mapping(uint16_t value);
const char *hidpp20_1b04_get_physical_mapping_name(uint16_t value);
/* -------------------------------------------------------------------------- */
/* 0x1d4b: Wireless Device Status */
/* -------------------------------------------------------------------------- */
#define HIDPP_PAGE_WIRELESS_DEVICE_STATUS 0x1d4b
/* -------------------------------------------------------------------------- */
/* 0x2200: Mouse Pointer Basic Optical Sensors */
/* -------------------------------------------------------------------------- */