Improvements to extrakey HID descriptors (#8156)
This commit is contained in:
parent
ef8878fba5
commit
088b64ab3d
7 changed files with 78 additions and 62 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 \
|
||||
|
|
|
@ -377,39 +377,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 = {{
|
||||
// clang-format off
|
||||
0x05, 0x01, // Usage Page (Generic Desktop)
|
||||
0x09, 0x80, // Usage (System Control)
|
||||
0xA1, 0x01, // Collection (Application)
|
||||
0x85, REPORT_ID_SYSTEM, // Report ID
|
||||
0x1A, 0x81,
|
||||
0x00, // Usage Minimum (81) (System Power Down)
|
||||
0x2A, 0x83,
|
||||
0x00, // Usage Maximum (83) (System Wake Up)
|
||||
0x16, 0x01,
|
||||
0x00, // Logical Minimum (1)
|
||||
0x26, 0x03,
|
||||
0x00, // Logical Maximum (3)
|
||||
0x95, 0x01, // Report Count (1)
|
||||
0x75, 0x10, // Report Size (16)
|
||||
0x81, 0x00, // Input (Data, Array, Absolute)
|
||||
0xC0, // End Collection
|
||||
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, 0x0C, // Usage Page (Consumer)
|
||||
0x09, 0x01, // Usage (Consumer Control)
|
||||
0xA1, 0x01, // Collection (Application)
|
||||
0x85, REPORT_ID_CONSUMER, // Report ID
|
||||
0x1A, 0x01,
|
||||
0x00, // Usage Minimum (Consumer Control)
|
||||
0x2A, 0x9C,
|
||||
0x02, // Usage Maximum (AC Distribute Vertically)
|
||||
0x16, 0x01,
|
||||
0x00, // Logical Minimum
|
||||
0x26, 0x9C,
|
||||
0x02, // Logical Maximum
|
||||
0x95, 0x01, // Report Count (1)
|
||||
0x75, 0x10, // Report Size (16)
|
||||
0x81, 0x00, // Input (Data, Array, Absolute)
|
||||
0xC0 // End Collection
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue