summaryrefslogtreecommitdiffstats
path: root/quantum/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/keyboard.c')
-rw-r--r--quantum/keyboard.c37
1 files changed, 15 insertions, 22 deletions
diff --git a/quantum/keyboard.c b/quantum/keyboard.c
index daa93223d0..749ebb559c 100644
--- a/quantum/keyboard.c
+++ b/quantum/keyboard.c
@@ -66,9 +66,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef JOYSTICK_ENABLE
# include "process_joystick.h"
#endif
-#ifdef PROGRAMMABLE_BUTTON_ENABLE
-# include "programmable_button.h"
-#endif
#ifdef HD44780_ENABLE
# include "hd44780.h"
#endif
@@ -93,9 +90,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#if defined(CRC_ENABLE)
# include "crc.h"
#endif
-#ifdef DIGITIZER_ENABLE
-# include "digitizer.h"
-#endif
#ifdef VIRTSER_ENABLE
# include "virtser.h"
#endif
@@ -106,7 +100,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# include "split_util.h"
#endif
#ifdef BLUETOOTH_ENABLE
-# include "outputselect.h"
+# include "bluetooth.h"
#endif
#ifdef CAPS_WORD_ENABLE
# include "caps_word.h"
@@ -170,12 +164,11 @@ uint32_t get_matrix_scan_rate(void) {
#endif
#ifdef MATRIX_HAS_GHOST
-extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
-static matrix_row_t get_real_keys(uint8_t row, matrix_row_t rowdata) {
+static matrix_row_t get_real_keys(uint8_t row, matrix_row_t rowdata) {
matrix_row_t out = 0;
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
// read each key in the row data and check if the keymap defines it as a real key
- if (pgm_read_byte(&keymaps[0][row][col]) && (rowdata & (1 << col))) {
+ if (keycode_at_keymap_location(0, row, col) && (rowdata & (1 << col))) {
// this creates new row data, if a key is defined in the keymap, it will be set here
out |= 1 << col;
}
@@ -349,9 +342,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
@@ -367,6 +357,9 @@ void keyboard_init(void) {
#ifdef SPLIT_KEYBOARD
split_pre_init();
#endif
+#ifdef ENCODER_ENABLE
+ encoder_init();
+#endif
matrix_init();
quantum_init();
#if defined(CRC_ENABLE)
@@ -387,9 +380,6 @@ void keyboard_init(void) {
#ifdef RGBLIGHT_ENABLE
rgblight_init();
#endif
-#ifdef ENCODER_ENABLE
- encoder_init();
-#endif
#ifdef STENO_ENABLE_ALL
steno_init();
#endif
@@ -413,6 +403,9 @@ void keyboard_init(void) {
// init after split init
pointing_device_init();
#endif
+#ifdef BLUETOOTH_ENABLE
+ bluetooth_init();
+#endif
#if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE)
debug_enable = true;
@@ -590,6 +583,10 @@ void keyboard_task(void) {
quantum_task();
+#if defined(SPLIT_WATCHDOG_ENABLE)
+ split_watchdog_task();
+#endif
+
#if defined(RGBLIGHT_ENABLE)
rgblight_task();
#endif
@@ -665,12 +662,8 @@ void keyboard_task(void) {
joystick_task();
#endif
-#ifdef DIGITIZER_ENABLE
- digitizer_task();
-#endif
-
-#ifdef PROGRAMMABLE_BUTTON_ENABLE
- programmable_button_send();
+#ifdef BLUETOOTH_ENABLE
+ bluetooth_task();
#endif
led_task();