From f7d2b001bc4f79164e9ea3a4ff7faa54be0b7d82 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 8 Sep 2022 04:59:24 +1000 Subject: Move Bluetooth-related function calls up to host/keyboard level (#18274) * Move Bluetooth-related function calls up to host/keyboard level * Remove pointless set_output() call * Move bluetooth (rn42) init to end of keyboard_init() * Enable SPI/UART for ChibiOS targets * Some more slight tweaks --- quantum/keyboard.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'quantum/keyboard.c') diff --git a/quantum/keyboard.c b/quantum/keyboard.c index 1c62a43d9d..3b5e9b0200 100644 --- a/quantum/keyboard.c +++ b/quantum/keyboard.c @@ -107,6 +107,11 @@ along with this program. If not, see . #endif #ifdef BLUETOOTH_ENABLE # include "outputselect.h" +# ifdef BLUETOOTH_BLUEFRUIT_LE +# include "bluefruit_le.h" +# elif BLUETOOTH_RN42 +# include "rn42.h" +# endif #endif #ifdef CAPS_WORD_ENABLE # include "caps_word.h" @@ -346,9 +351,6 @@ void quantum_init(void) { #ifdef HAPTIC_ENABLE haptic_init(); #endif -#if defined(BLUETOOTH_ENABLE) && defined(OUTPUT_AUTO_ENABLE) - set_output(OUTPUT_AUTO); -#endif } /** \brief keyboard_init @@ -410,6 +412,9 @@ void keyboard_init(void) { // init after split init pointing_device_init(); #endif +#if defined(BLUETOOTH_RN42) + rn42_init(); +#endif #if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) debug_enable = true; @@ -670,5 +675,9 @@ void keyboard_task(void) { programmable_button_send(); #endif +#ifdef BLUETOOTH_BLUEFRUIT_LE + bluefruit_le_task(); +#endif + led_task(); } -- cgit v1.2.3