From 09d668eb0ed3ff6fa48ce1db98910b022bca2d90 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 3 Sep 2022 05:38:27 +1000 Subject: 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 --- tmk_core/protocol/arm_atsam/main_arm_atsam.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'tmk_core/protocol/arm_atsam') diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index 8ee9e042e7..a2f20db66e 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c @@ -37,14 +37,13 @@ void main_subtasks(void); 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); #ifdef DEFERRED_EXEC_ENABLE void deferred_exec_task(void); #endif // DEFERRED_EXEC_ENABLE -host_driver_t arm_atsam_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; +host_driver_t arm_atsam_driver = {keyboard_leds, send_keyboard, send_mouse, send_extra}; uint8_t led_states; @@ -132,18 +131,6 @@ void send_extra(uint8_t report_id, uint16_t data) { } #endif // EXTRAKEY_ENABLE -void send_system(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - send_extra(REPORT_ID_SYSTEM, data); -#endif // EXTRAKEY_ENABLE -} - -void send_consumer(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - send_extra(REPORT_ID_CONSUMER, data); -#endif // EXTRAKEY_ENABLE -} - #ifdef CONSOLE_ENABLE # define CONSOLE_PRINTBUF_SIZE 512 static char console_printbuf[CONSOLE_PRINTBUF_SIZE]; -- cgit v1.2.3