Improvements to extrakey HID descriptors (#8156)

This commit is contained in:
Ryan
2020-02-25 12:18:11 +11:00
committed by Drashna Jael're
parent f4b460c200
commit ebb243aace
7 changed files with 86 additions and 66 deletions
@@ -130,7 +130,6 @@ void send_extra(uint8_t report_id, uint16_t data) {
void send_system(uint16_t data) {
#ifdef EXTRAKEY_ENABLE
if (data != 0) data = data - SYSTEM_POWER_DOWN + 1;
send_extra(REPORT_ID_SYSTEM, data);
#endif // EXTRAKEY_ENABLE
}
@@ -327,7 +327,7 @@ typedef struct {
} udi_hid_exk_desc_t;
typedef struct {
uint8_t array[54];
uint8_t array[50];
} udi_hid_exk_report_desc_t;
# define UDI_HID_EXK_DESC \
@@ -429,7 +429,7 @@ typedef struct {
} udi_hid_raw_desc_t;
typedef struct {
uint8_t array[27];
uint8_t array[26];
} udi_hid_raw_report_desc_t;
# define UDI_HID_RAW_DESC \
+26 -28
View File
@@ -373,35 +373,33 @@ static uint8_t udi_hid_exk_report_trans[UDI_HID_EXK_REPORT_SIZE];
COMPILER_WORD_ALIGNED
UDC_DESC_STORAGE udi_hid_exk_report_desc_t udi_hid_exk_report_desc = {{
// System Control Collection (8 bits)
// clang-format off
0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x80, // Usage (System Control)
0xA1, 0x01, // Collection (Application)
0x85, REPORT_ID_SYSTEM, // Report ID
0x19, 0x01, // Usage Minimum (Pointer)
0x2A, 0xB7, 0x00, // Usage Maximum (System Display LCD Autoscale)
0x15, 0x01, // Logical Minimum
0x26, 0xB7, 0x00, // Logical Maximum
0x95, 0x01, // Report Count (1)
0x75, 0x10, // Report Size (16)
0x81, 0x00, // Input (Data, Array, Absolute)
0xC0, // End Collection
0x05, 0x01, // Usage Page (Generic Desktop),
0x09, 0x80, // Usage (System Control),
0xA1, 0x01, // Collection (Application),
0x85, REPORT_ID_SYSTEM, // Report ID (2) (System),
0x16, 0x01, 0x00, // Logical Minimum (1),
0x26, 0x03, 0x00, // Logical Maximum (3),
0x1A, 0x81, 0x00, // Usage Minimum (81) (System Power Down),
0x2A, 0x83, 0x00, // Usage Maximum (83) (System Wake Up),
0x75, 0x10, // Report Size (16),
0x95, 0x01, // Report Count (1),
0x81, 0x00, // Input (Data, Array),
0xC0, // End Collection - System Control
// Consumer Control Collection - Media Keys (16 bits)
0x05, 0x0C, // Usage Page (Consumer),
0x09, 0x01, // Usage (Consumer Control),
0xA1, 0x01, // Collection (Application),
0x85, REPORT_ID_CONSUMER, // Report ID (3) (Consumer),
0x16, 0x01, 0x00, // Logical Minimum (1),
0x26, 0x9C, 0x02, // Logical Maximum (668),
0x1A, 0x01, 0x00, // Usage Minimum (1),
0x2A, 0x9C, 0x02, // Usage Maximum (668),
0x75, 0x10, // Report Size (16),
0x95, 0x01, // Report Count (1),
0x81, 0x00, // Input (Data, Array),
0xC0, // End Collection - Consumer Control
0x05, 0x0C, // Usage Page (Consumer)
0x09, 0x01, // Usage (Consumer Control)
0xA1, 0x01, // Collection (Application)
0x85, REPORT_ID_CONSUMER, // Report ID
0x19, 0x01, // Usage Minimum (Consumer Control)
0x2A, 0xA0, 0x02, // Usage Maximum (AC Desktop Show All Applications)
0x15, 0x01, // Logical Minimum
0x26, 0xA0, 0x02, // Logical Maximum
0x95, 0x01, // Report Count (1)
0x75, 0x10, // Report Size (16)
0x81, 0x00, // Input (Data, Array, Absolute)
0xC0 // End Collection
//clang-format on
}};
static bool udi_hid_exk_setreport(void);