summaryrefslogtreecommitdiff
path: root/tmk_core/protocol
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2025-04-21 22:27:56 +0100
committerGitHub <noreply@github.com>2025-04-21 22:27:56 +0100
commitc7cb7ba9765b35930a26ec247e362615ffd10ed2 (patch)
treebbab7782a3c1937f69a8c105dc06cfa1b7f54346 /tmk_core/protocol
parentec324af22eddff1f89f33a30c77a678b111c420c (diff)
Implement connection keycode logic (#25176)
Diffstat (limited to 'tmk_core/protocol')
-rw-r--r--tmk_core/protocol/host.c11
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/>.
31#endif 31#endif
32 32
33#ifdef BLUETOOTH_ENABLE 33#ifdef BLUETOOTH_ENABLE
34# ifndef CONNECTION_ENABLE
35# error CONNECTION_ENABLE required and not enabled
36# endif
37# include "connection.h"
34# include "bluetooth.h" 38# include "bluetooth.h"
35# include "outputselect.h"
36#endif 39#endif
37 40
38#ifdef NKRO_ENABLE 41#ifdef NKRO_ENABLE
@@ -74,7 +77,7 @@ led_t host_keyboard_led_state(void) {
74/* send report */ 77/* send report */
75void host_keyboard_send(report_keyboard_t *report) { 78void host_keyboard_send(report_keyboard_t *report) {
76#ifdef BLUETOOTH_ENABLE 79#ifdef BLUETOOTH_ENABLE
77 if (where_to_send() == OUTPUT_BLUETOOTH) { 80 if (connection_get_host() == CONNECTION_HOST_BLUETOOTH) {
78 bluetooth_send_keyboard(report); 81 bluetooth_send_keyboard(report);
79 return; 82 return;
80 } 83 }
@@ -111,7 +114,7 @@ void host_nkro_send(report_nkro_t *report) {
111 114
112void host_mouse_send(report_mouse_t *report) { 115void host_mouse_send(report_mouse_t *report) {
113#ifdef BLUETOOTH_ENABLE 116#ifdef BLUETOOTH_ENABLE
114 if (where_to_send() == OUTPUT_BLUETOOTH) { 117 if (connection_get_host() == CONNECTION_HOST_BLUETOOTH) {
115 bluetooth_send_mouse(report); 118 bluetooth_send_mouse(report);
116 return; 119 return;
117 } 120 }
@@ -147,7 +150,7 @@ void host_consumer_send(uint16_t usage) {
147 last_consumer_usage = usage; 150 last_consumer_usage = usage;
148 151
149#ifdef BLUETOOTH_ENABLE 152#ifdef BLUETOOTH_ENABLE
150 if (where_to_send() == OUTPUT_BLUETOOTH) { 153 if (connection_get_host() == CONNECTION_HOST_BLUETOOTH) {
151 bluetooth_send_consumer(usage); 154 bluetooth_send_consumer(usage);
152 return; 155 return;
153 } 156 }