diff options
author | Joel Challis <[email protected]> | 2025-04-21 22:27:56 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2025-04-21 22:27:56 +0100 |
commit | c7cb7ba9765b35930a26ec247e362615ffd10ed2 (patch) | |
tree | bbab7782a3c1937f69a8c105dc06cfa1b7f54346 /tmk_core/protocol/host.c | |
parent | ec324af22eddff1f89f33a30c77a678b111c420c (diff) | |
download | qmk_firmware-c7cb7ba9765b35930a26ec247e362615ffd10ed2.tar.gz qmk_firmware-c7cb7ba9765b35930a26ec247e362615ffd10ed2.zip |
Implement connection keycode logic (#25176)
Diffstat (limited to 'tmk_core/protocol/host.c')
-rw-r--r-- | tmk_core/protocol/host.c | 11 |
1 files changed, 7 insertions, 4 deletions
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 <http://www.gnu.org/licenses/>. #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; } |