From c7cb7ba9765b35930a26ec247e362615ffd10ed2 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 21 Apr 2025 22:27:56 +0100 Subject: Implement connection keycode logic (#25176) --- tmk_core/protocol/host.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tmk_core/protocol') diff --git a/tmk_core/protocol/host.c b/tmk_core/protocol/host.c index df805c827c..453952049f 100644 --- a/tmk_core/protocol/host.c +++ b/tmk_core/protocol/host.c @@ -31,8 +31,11 @@ along with this program. If not, see . #endif #ifdef BLUETOOTH_ENABLE +# ifndef CONNECTION_ENABLE +# error CONNECTION_ENABLE required and not enabled +# endif +# include "connection.h" # include "bluetooth.h" -# include "outputselect.h" #endif #ifdef NKRO_ENABLE @@ -74,7 +77,7 @@ led_t host_keyboard_led_state(void) { /* send report */ void host_keyboard_send(report_keyboard_t *report) { #ifdef BLUETOOTH_ENABLE - if (where_to_send() == OUTPUT_BLUETOOTH) { + if (connection_get_host() == CONNECTION_HOST_BLUETOOTH) { bluetooth_send_keyboard(report); return; } @@ -111,7 +114,7 @@ void host_nkro_send(report_nkro_t *report) { void host_mouse_send(report_mouse_t *report) { #ifdef BLUETOOTH_ENABLE - if (where_to_send() == OUTPUT_BLUETOOTH) { + if (connection_get_host() == CONNECTION_HOST_BLUETOOTH) { bluetooth_send_mouse(report); return; } @@ -147,7 +150,7 @@ void host_consumer_send(uint16_t usage) { last_consumer_usage = usage; #ifdef BLUETOOTH_ENABLE - if (where_to_send() == OUTPUT_BLUETOOTH) { + if (connection_get_host() == CONNECTION_HOST_BLUETOOTH) { bluetooth_send_consumer(usage); return; } -- cgit v1.2.3