aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/protocol/arm_atsam
diff options
context:
space:
mode:
authorJames Laird-Wah <james@laird-wah.net>2018-11-16 17:22:05 +1100
committerDrashna Jaelre <drashna@live.com>2018-11-15 22:22:05 -0800
commit39bd760faf2666e91d6dc5b199f02fa3206c6acd (patch)
tree12db265881a0d358bb0e186689a7b20a81c37bc6 /tmk_core/protocol/arm_atsam
parent46cf8cc9b33a3c8bdbb0ce7df7f48f28e4d979a5 (diff)
downloadqmk_firmware-39bd760faf2666e91d6dc5b199f02fa3206c6acd.tar.gz
qmk_firmware-39bd760faf2666e91d6dc5b199f02fa3206c6acd.zip
Use a single endpoint for HID reports (#3951)
* Unify multiple HID interfaces into one This reduces the number of USB endpoints required, which frees them up for other things. NKRO and EXTRAKEY always use the shared endpoint. By default, MOUSEKEY also uses it. This means it won't work as a Boot Procotol mouse in some BIOSes, etc. If you really think your keyboard needs to work as a mouse in your BIOS, set MOUSE_SHARED_EP = no in your rules.mk. By default, the core keyboard does not use the shared endpoint, as not all BIOSes are standards compliant and that's one place you don't want to find out your keyboard doesn't work.. If you are really confident, you can set KEYBOARD_SHARED_EP = yes to use the shared endpoint here too. * unify endpoints: ChibiOS protocol implementation * fixup: missing #ifdef EXTRAKEY_ENABLEs broke build on AVR with EXTRAKEY disabled * endpoints: restore error when too many endpoints required * lufa: wait up to 10ms to send keyboard input This avoids packets being dropped when two reports are sent in quick succession (eg. releasing a dual role key). * endpoints: fix compile on ARM_ATSAM * endpoint: ARM_ATSAM fixes No longer use wrong or unexpected endpoint IDs * endpoints: accommodate VUSB protocol V-USB has its own, understandably simple ideas about the report formats. It already blasts the mouse and extrakeys through one endpoint with report IDs. We just stay out of its way. * endpoints: document new endpoint configuration options * endpoints: respect keyboard_report->mods in NKRO The caller(s) of host_keyboard_send expect to be able to just drop modifiers in the mods field and not worry about whether NKRO is in use. This is a good thing. So we just shift it over if needs be. * endpoints: report.c: update for new keyboard_report format
Diffstat (limited to 'tmk_core/protocol/arm_atsam')
-rw-r--r--tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c5
1 files changed, 3 insertions, 2 deletions
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 18f9784ae..c263ac4aa 100644
--- a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c
+++ b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c
@@ -54,6 +54,7 @@
54#include "udi_hid.h" 54#include "udi_hid.h"
55#include "udi_hid_kbd.h" 55#include "udi_hid_kbd.h"
56#include <string.h> 56#include <string.h>
57#include "report.h"
57 58
58//*************************************************************************** 59//***************************************************************************
59// KBD 60// KBD
@@ -430,7 +431,7 @@ UDC_DESC_STORAGE udi_hid_exk_report_desc_t udi_hid_exk_report_desc = {
430 0x05, 0x01, // Usage Page (Generic Desktop), 431 0x05, 0x01, // Usage Page (Generic Desktop),
431 0x09, 0x80, // Usage (System Control), 432 0x09, 0x80, // Usage (System Control),
432 0xA1, 0x01, // Collection (Application), 433 0xA1, 0x01, // Collection (Application),
433 0x85, 0x02, // Report ID (2) (System), 434 0x85, REPORT_ID_SYSTEM, // Report ID (2) (System),
434 0x16, 0x01, 0x00, // Logical Minimum (1), 435 0x16, 0x01, 0x00, // Logical Minimum (1),
435 0x26, 0x03, 0x00, // Logical Maximum (3), 436 0x26, 0x03, 0x00, // Logical Maximum (3),
436 0x1A, 0x81, 0x00, // Usage Minimum (81) (System Power Down), 437 0x1A, 0x81, 0x00, // Usage Minimum (81) (System Power Down),
@@ -445,7 +446,7 @@ UDC_DESC_STORAGE udi_hid_exk_report_desc_t udi_hid_exk_report_desc = {
445 0x05, 0x0C, // Usage Page (Consumer), 446 0x05, 0x0C, // Usage Page (Consumer),
446 0x09, 0x01, // Usage (Consumer Control), 447 0x09, 0x01, // Usage (Consumer Control),
447 0xA1, 0x01, // Collection (Application), 448 0xA1, 0x01, // Collection (Application),
448 0x85, 0x03, // Report ID (3) (Consumer), 449 0x85, REPORT_ID_CONSUMER, // Report ID (3) (Consumer),
449 0x16, 0x01, 0x00, // Logical Minimum (1), 450 0x16, 0x01, 0x00, // Logical Minimum (1),
450 0x26, 0x9C, 0x02, // Logical Maximum (668), 451 0x26, 0x9C, 0x02, // Logical Maximum (668),
451 0x1A, 0x01, 0x00, // Usage Minimum (1), 452 0x1A, 0x01, 0x00, // Usage Minimum (1),