From 6dbbeea46a0ac7527235982cb6406802df846805 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 7 Oct 2022 13:35:01 +1100 Subject: Refactor `send_extra` (#18615) --- tmk_core/protocol/lufa/lufa.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tmk_core/protocol/lufa/lufa.c') diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 869ed71d76..fa3ced8fd6 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -84,7 +84,7 @@ 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_extra(uint8_t report_id, uint16_t data); +static void send_extra(report_extra_t *report); host_driver_t lufa_driver = {keyboard_leds, send_keyboard, send_mouse, send_extra}; #ifdef VIRTSER_ENABLE @@ -663,11 +663,9 @@ static void send_report(void *report, size_t size) { * * FIXME: Needs doc */ -static void send_extra(uint8_t report_id, uint16_t data) { +static void send_extra(report_extra_t *report) { #ifdef EXTRAKEY_ENABLE - static report_extra_t r; - r = (report_extra_t){.report_id = report_id, .usage = data}; - send_report(&r, sizeof(r)); + send_report(report, sizeof(report_extra_t)); #endif } -- cgit v1.2.3