summaryrefslogtreecommitdiff
path: root/tmk_core/protocol
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2025-05-06 06:47:44 +0100
committerGitHub <noreply@github.com>2025-05-06 06:47:44 +0100
commitab1332bb6cc798c037a0bd58c22d954755226dbf (patch)
tree1b1308c8035c1e2aeb07197cbd001a4b281a7f26 /tmk_core/protocol
parentac991405d0c9f47e815786f4732edd00d0f4f571 (diff)
Remove force disable of NKRO when Bluetooth enabled (#25201)
Diffstat (limited to 'tmk_core/protocol')
-rw-r--r--tmk_core/protocol/host.c18
-rw-r--r--tmk_core/protocol/host.h1
2 files changed, 19 insertions, 0 deletions
diff --git a/tmk_core/protocol/host.c b/tmk_core/protocol/host.c
index 4f3867df08..e785cb24cc 100644
--- a/tmk_core/protocol/host.c
+++ b/tmk_core/protocol/host.c
@@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
21#include "host.h" 21#include "host.h"
22#include "util.h" 22#include "util.h"
23#include "debug.h" 23#include "debug.h"
24#include "usb_device_state.h"
24 25
25#ifdef DIGITIZER_ENABLE 26#ifdef DIGITIZER_ENABLE
26# include "digitizer.h" 27# include "digitizer.h"
@@ -90,6 +91,23 @@ static host_driver_t *host_get_active_driver(void) {
90 return driver; 91 return driver;
91} 92}
92 93
94bool host_can_send_nkro(void) {
95#ifdef CONNECTION_ENABLE
96 switch (connection_get_host()) {
97# ifdef BLUETOOTH_ENABLE
98 case CONNECTION_HOST_BLUETOOTH:
99 return bluetooth_can_send_nkro();
100# endif
101 case CONNECTION_HOST_NONE:
102 return false;
103 default:
104 break;
105 }
106#endif
107
108 return usb_device_state_get_protocol() == USB_PROTOCOL_REPORT;
109}
110
93#ifdef SPLIT_KEYBOARD 111#ifdef SPLIT_KEYBOARD
94uint8_t split_led_state = 0; 112uint8_t split_led_state = 0;
95void set_split_host_keyboard_leds(uint8_t led_state) { 113void set_split_host_keyboard_leds(uint8_t led_state) {
diff --git a/tmk_core/protocol/host.h b/tmk_core/protocol/host.h
index d824fca077..8e8a18e2ed 100644
--- a/tmk_core/protocol/host.h
+++ b/tmk_core/protocol/host.h
@@ -32,6 +32,7 @@ void host_set_driver(host_driver_t *driver);
32host_driver_t *host_get_driver(void); 32host_driver_t *host_get_driver(void);
33 33
34/* host driver interface */ 34/* host driver interface */
35bool host_can_send_nkro(void);
35uint8_t host_keyboard_leds(void); 36uint8_t host_keyboard_leds(void);
36led_t host_keyboard_led_state(void); 37led_t host_keyboard_led_state(void);
37void host_keyboard_send(report_keyboard_t *report); 38void host_keyboard_send(report_keyboard_t *report);