diff options
Diffstat (limited to 'quantum/keyboard.c')
-rw-r--r-- | quantum/keyboard.c | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/quantum/keyboard.c b/quantum/keyboard.c index 1c62a43d9d..37675ded0b 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; } @@ -346,9 +339,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 @@ -364,6 +354,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) @@ -384,9 +377,6 @@ void keyboard_init(void) { #ifdef RGBLIGHT_ENABLE rgblight_init(); #endif -#ifdef ENCODER_ENABLE - encoder_init(); -#endif #ifdef STENO_ENABLE_ALL steno_init(); #endif @@ -410,6 +400,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; @@ -587,6 +580,10 @@ void keyboard_task(void) { quantum_task(); +#if defined(SPLIT_WATCHDOG_ENABLE) + split_watchdog_task(); +#endif + #if defined(RGBLIGHT_ENABLE) rgblight_task(); #endif @@ -662,12 +659,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(); |