From 53ba4d975d7f9c09bf73f0d8362b54dbc20b2ceb Mon Sep 17 00:00:00 2001 From: Haochen Tong Date: Tue, 27 Nov 2018 01:37:38 +0100 Subject: [PATCH] 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. --- src/hidpp20.c | 3 +++ src/hidpp20.h | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/hidpp20.c b/src/hidpp20.c index 444f01e4..444f816c 100644 --- a/src/hidpp20.c +++ b/src/hidpp20.c @@ -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); diff --git a/src/hidpp20.h b/src/hidpp20.h index ac2f798e..2533c513 100644 --- a/src/hidpp20.h +++ b/src/hidpp20.h @@ -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 */ /* -------------------------------------------------------------------------- */