summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/arm_atsam
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-02-25 12:18:11 +1100
committerGitHub <noreply@github.com>2020-02-25 12:18:11 +1100
commit088b64ab3d598574244db5ac67fec889bdc58119 (patch)
tree130709c89d516c3c91177ae0b310017c32b51ffb /tmk_core/protocol/arm_atsam
parentef8878fba5d3786e3f9c66436da63a560cd36ac9 (diff)
Improvements to extrakey HID descriptors (#8156)
Diffstat (limited to 'tmk_core/protocol/arm_atsam')
-rw-r--r--tmk_core/protocol/arm_atsam/main_arm_atsam.c1
-rw-r--r--tmk_core/protocol/arm_atsam/usb/udi_device_conf.h4
-rw-r--r--tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c42
3 files changed, 20 insertions, 27 deletions
diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c
index 9c8073dd9e..e952a427ef 100644
--- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c
+++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c
@@ -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
}
diff --git a/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h b/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h
index f22f5003ab..80556205f2 100644
--- a/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h
+++ b/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h
@@ -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 \
diff --git a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c
index 5b32954071..cf9297dc78 100644
--- a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c
+++ b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c
@@ -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);