diff options
author | Ryan <fauxpark@gmail.com> | 2022-09-03 05:38:27 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-02 20:38:27 +0100 |
commit | 09d668eb0ed3ff6fa48ce1db98910b022bca2d90 (patch) | |
tree | da13eca69e7e24e439c4bccdd1296fc4de212085 /tmk_core/protocol/chibios | |
parent | 0ceaaaae8e71f4713d232ac1b657906f4a45833f (diff) |
Simplify extrakeys sending at the host driver level (#18230)
* Simplify extrakeys sending at the host driver level
* There are two arguments here
* Wrong syntax
* Adjust keyboards which use a custom host driver
Diffstat (limited to 'tmk_core/protocol/chibios')
-rw-r--r-- | tmk_core/protocol/chibios/chibios.c | 5 | ||||
-rw-r--r-- | tmk_core/protocol/chibios/usb_main.c | 14 |
2 files changed, 3 insertions, 16 deletions
diff --git a/tmk_core/protocol/chibios/chibios.c b/tmk_core/protocol/chibios/chibios.c index c9a480c325..024160a925 100644 --- a/tmk_core/protocol/chibios/chibios.c +++ b/tmk_core/protocol/chibios/chibios.c @@ -58,13 +58,12 @@ uint8_t keyboard_leds(void); void send_keyboard(report_keyboard_t *report); void send_mouse(report_mouse_t *report); -void send_system(uint16_t data); -void send_consumer(uint16_t data); +void send_extra(uint8_t report_id, uint16_t data); void send_programmable_button(uint32_t data); void send_digitizer(report_digitizer_t *report); /* host struct */ -host_driver_t chibios_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer, send_programmable_button}; +host_driver_t chibios_driver = {keyboard_leds, send_keyboard, send_mouse, send_extra, send_programmable_button}; #ifdef VIRTSER_ENABLE void virtser_task(void); diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index eb9ef82554..d218deb6f9 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -947,7 +947,7 @@ void shared_in_cb(USBDriver *usbp, usbep_t ep) { */ #ifdef EXTRAKEY_ENABLE -static void send_extra(uint8_t report_id, uint16_t data) { +void send_extra(uint8_t report_id, uint16_t data) { osalSysLock(); if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { osalSysUnlock(); @@ -973,18 +973,6 @@ static void send_extra(uint8_t report_id, uint16_t data) { } #endif -void send_system(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - send_extra(REPORT_ID_SYSTEM, data); -#endif -} - -void send_consumer(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - send_extra(REPORT_ID_CONSUMER, data); -#endif -} - void send_programmable_button(uint32_t data) { #ifdef PROGRAMMABLE_BUTTON_ENABLE osalSysLock(); |