diff options
| author | Joel Challis | 2025-05-06 07:47:44 +0200 |
|---|---|---|
| committer | GitHub | 2025-05-06 07:47:44 +0200 |
| commit | ab1332bb6cc798c037a0bd58c22d954755226dbf (patch) | |
| tree | 1b1308c8035c1e2aeb07197cbd001a4b281a7f26 /tmk_core/protocol/host.c | |
| parent | ac991405d0c9f47e815786f4732edd00d0f4f571 (diff) | |
Remove force disable of NKRO when Bluetooth enabled (#25201)
Diffstat (limited to 'tmk_core/protocol/host.c')
| -rw-r--r-- | tmk_core/protocol/host.c | 18 |
1 files changed, 18 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/>. #include "host.h" #include "util.h" #include "debug.h" +#include "usb_device_state.h" #ifdef DIGITIZER_ENABLE # include "digitizer.h" @@ -90,6 +91,23 @@ static host_driver_t *host_get_active_driver(void) { return driver; } +bool host_can_send_nkro(void) { +#ifdef CONNECTION_ENABLE + switch (connection_get_host()) { +# ifdef BLUETOOTH_ENABLE + case CONNECTION_HOST_BLUETOOTH: + return bluetooth_can_send_nkro(); +# endif + case CONNECTION_HOST_NONE: + return false; + default: + break; + } +#endif + + return usb_device_state_get_protocol() == USB_PROTOCOL_REPORT; +} + #ifdef SPLIT_KEYBOARD uint8_t split_led_state = 0; void set_split_host_keyboard_leds(uint8_t led_state) { |