From f80058d96e2f1606f648166d320cda15986ced4c Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 30 Sep 2022 03:38:09 +1000 Subject: Start Bluetooth API (#18366) --- tmk_core/protocol/host.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'tmk_core/protocol') diff --git a/tmk_core/protocol/host.c b/tmk_core/protocol/host.c index 99298ad6d6..7b051a881b 100644 --- a/tmk_core/protocol/host.c +++ b/tmk_core/protocol/host.c @@ -29,12 +29,8 @@ along with this program. If not, see . #endif #ifdef BLUETOOTH_ENABLE +# include "bluetooth.h" # include "outputselect.h" -# ifdef BLUETOOTH_BLUEFRUIT_LE -# include "bluefruit_le.h" -# elif BLUETOOTH_RN42 -# include "rn42.h" -# endif #endif #ifdef NKRO_ENABLE @@ -78,11 +74,7 @@ led_t host_keyboard_led_state(void) { void host_keyboard_send(report_keyboard_t *report) { #ifdef BLUETOOTH_ENABLE if (where_to_send() == OUTPUT_BLUETOOTH) { -# ifdef BLUETOOTH_BLUEFRUIT_LE - bluefruit_le_send_keys(report->mods, report->keys, sizeof(report->keys)); -# elif BLUETOOTH_RN42 - rn42_send_keyboard(report); -# endif + bluetooth_send_keyboard(report); return; } #endif @@ -116,12 +108,7 @@ void host_keyboard_send(report_keyboard_t *report) { void host_mouse_send(report_mouse_t *report) { #ifdef BLUETOOTH_ENABLE if (where_to_send() == OUTPUT_BLUETOOTH) { -# ifdef BLUETOOTH_BLUEFRUIT_LE - // FIXME: mouse buttons - bluefruit_le_send_mouse_move(report->x, report->y, report->v, report->h, report->buttons); -# elif BLUETOOTH_RN42 - rn42_send_mouse(report); -# endif + bluetooth_send_mouse(report); return; } #endif @@ -152,11 +139,7 @@ void host_consumer_send(uint16_t report) { #ifdef BLUETOOTH_ENABLE if (where_to_send() == OUTPUT_BLUETOOTH) { -# ifdef BLUETOOTH_BLUEFRUIT_LE - bluefruit_le_send_consumer_key(report); -# elif BLUETOOTH_RN42 - rn42_send_consumer(report); -# endif + bluetooth_send_consumer(report); return; } #endif -- cgit v1.2.3