summaryrefslogtreecommitdiff
path: root/tmk_core
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2022-09-30 03:38:09 +1000
committerGitHub <noreply@github.com>2022-09-29 18:38:09 +0100
commitf80058d96e2f1606f648166d320cda15986ced4c (patch)
treedb60471363d59bb52d124a276bde9cf93e93c591 /tmk_core
parentcbbb45c13f3de5ec28f62b6cd4a8b77143026500 (diff)
Start Bluetooth API (#18366)
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/protocol/host.c25
1 files changed, 4 insertions, 21 deletions
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 <http://www.gnu.org/licenses/>.
#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