summaryrefslogtreecommitdiff
path: root/quantum/keyboard.c
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2022-09-08 04:59:24 +1000
committerGitHub <noreply@github.com>2022-09-07 19:59:24 +0100
commitf7d2b001bc4f79164e9ea3a4ff7faa54be0b7d82 (patch)
tree304a51de5cb8a64958645812941b0ebfe65223d9 /quantum/keyboard.c
parentcf8cdd19920b1810f3d3ecc987943ad8d59023b4 (diff)
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
Diffstat (limited to 'quantum/keyboard.c')
-rw-r--r--quantum/keyboard.c15
1 files changed, 12 insertions, 3 deletions
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 <http://www.gnu.org/licenses/>.
107#endif 107#endif
108#ifdef BLUETOOTH_ENABLE 108#ifdef BLUETOOTH_ENABLE
109# include "outputselect.h" 109# include "outputselect.h"
110# ifdef BLUETOOTH_BLUEFRUIT_LE
111# include "bluefruit_le.h"
112# elif BLUETOOTH_RN42
113# include "rn42.h"
114# endif
110#endif 115#endif
111#ifdef CAPS_WORD_ENABLE 116#ifdef CAPS_WORD_ENABLE
112# include "caps_word.h" 117# include "caps_word.h"
@@ -346,9 +351,6 @@ void quantum_init(void) {
346#ifdef HAPTIC_ENABLE 351#ifdef HAPTIC_ENABLE
347 haptic_init(); 352 haptic_init();
348#endif 353#endif
349#if defined(BLUETOOTH_ENABLE) && defined(OUTPUT_AUTO_ENABLE)
350 set_output(OUTPUT_AUTO);
351#endif
352} 354}
353 355
354/** \brief keyboard_init 356/** \brief keyboard_init
@@ -410,6 +412,9 @@ void keyboard_init(void) {
410 // init after split init 412 // init after split init
411 pointing_device_init(); 413 pointing_device_init();
412#endif 414#endif
415#if defined(BLUETOOTH_RN42)
416 rn42_init();
417#endif
413 418
414#if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) 419#if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE)
415 debug_enable = true; 420 debug_enable = true;
@@ -670,5 +675,9 @@ void keyboard_task(void) {
670 programmable_button_send(); 675 programmable_button_send();
671#endif 676#endif
672 677
678#ifdef BLUETOOTH_BLUEFRUIT_LE
679 bluefruit_le_task();
680#endif
681
673 led_task(); 682 led_task();
674} 683}