diff options
Diffstat (limited to 'tmk_core/protocol/lufa')
-rw-r--r-- | tmk_core/protocol/lufa/lufa.c | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index b4b03357a3..03e19745f8 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -101,10 +101,9 @@ static report_keyboard_t keyboard_report_sent; static uint8_t keyboard_leds(void); static void send_keyboard(report_keyboard_t *report); static void send_mouse(report_mouse_t *report); -static void send_system(uint16_t data); -static void send_consumer(uint16_t data); +static void send_extra(uint8_t report_id, uint16_t data); static void send_programmable_button(uint32_t data); -host_driver_t lufa_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer, send_programmable_button}; +host_driver_t lufa_driver = {keyboard_leds, send_keyboard, send_mouse, send_extra, send_programmable_button}; #ifdef VIRTSER_ENABLE // clang-format off @@ -746,32 +745,10 @@ static void send_report(void *report, size_t size) { * * FIXME: Needs doc */ -#ifdef EXTRAKEY_ENABLE static void send_extra(uint8_t report_id, uint16_t data) { - static report_extra_t r; - r = (report_extra_t){.report_id = report_id, .usage = data}; - send_report(&r, sizeof(r)); -} -#endif - -/** \brief Send System - * - * FIXME: Needs doc - */ -static void send_system(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - send_extra(REPORT_ID_SYSTEM, data); -#endif -} - -/** \brief Send Consumer - * - * FIXME: Needs doc - */ -static void send_consumer(uint16_t data) { #ifdef EXTRAKEY_ENABLE # ifdef BLUETOOTH_ENABLE - if (where_to_send() == OUTPUT_BLUETOOTH) { + if (report_id == REPORT_ID_CONSUMER && where_to_send() == OUTPUT_BLUETOOTH) { # ifdef BLUETOOTH_BLUEFRUIT_LE bluefruit_le_send_consumer_key(data); # elif BLUETOOTH_RN42 @@ -781,7 +758,9 @@ static void send_consumer(uint16_t data) { } # endif - send_extra(REPORT_ID_CONSUMER, data); + static report_extra_t r; + r = (report_extra_t){.report_id = report_id, .usage = data}; + send_report(&r, sizeof(r)); #endif } |