diff options
| author | Ryan <fauxpark@gmail.com> | 2023-07-16 23:42:56 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-16 23:42:56 +1000 |
| commit | da2d2f947d5c30aebea17f414fb22ad50fe5410b (patch) | |
| tree | fdf2ed307ddb8f32ecb9ef7444ecfdf7ff7b4904 | |
| parent | b9e5895184c6d36b46ba723d6d71e27249e70c20 (diff) | |
quantum: remove direct `quantum.h` includes (#21507)
51 files changed, 208 insertions, 62 deletions
diff --git a/keyboards/boardsource/lulu/lulu.c b/keyboards/boardsource/lulu/lulu.c index be6d565a32..8d011268c4 100644 --- a/keyboards/boardsource/lulu/lulu.c +++ b/keyboards/boardsource/lulu/lulu.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | // Copyright 2022 Cole Smith <cole@boadsource.xyz> | 1 | // Copyright 2022 Cole Smith <cole@boadsource.xyz> |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | #include "encoder.h" | 3 | #include "quantum.h" |
| 4 | 4 | ||
| 5 | #ifdef ENCODER_ENABLE | 5 | #ifdef ENCODER_ENABLE |
| 6 | bool encoder_update_kb(uint8_t index, bool clockwise) { | 6 | bool encoder_update_kb(uint8_t index, bool clockwise) { |
diff --git a/keyboards/input_club/k_type/k_type-rgbdriver.c b/keyboards/input_club/k_type/k_type-rgbdriver.c index e663c224c4..6529f98201 100644 --- a/keyboards/input_club/k_type/k_type-rgbdriver.c +++ b/keyboards/input_club/k_type/k_type-rgbdriver.c | |||
| @@ -19,8 +19,7 @@ | |||
| 19 | #include "rgb_matrix.h" | 19 | #include "rgb_matrix.h" |
| 20 | #include "i2c_master.h" | 20 | #include "i2c_master.h" |
| 21 | #include "is31fl3733-dual.h" | 21 | #include "is31fl3733-dual.h" |
| 22 | 22 | #include "gpio.h" | |
| 23 | |||
| 24 | 23 | ||
| 25 | static void init(void) { | 24 | static void init(void) { |
| 26 | i2c_init(&I2CD1, I2C1_SCL_PIN, I2C1_SDA_PIN); | 25 | i2c_init(&I2CD1, I2C1_SCL_PIN, I2C1_SDA_PIN); |
diff --git a/keyboards/input_club/k_type/keymaps/default/keymap.c b/keyboards/input_club/k_type/keymaps/default/keymap.c index 790bd93290..452791b13a 100644 --- a/keyboards/input_club/k_type/keymaps/default/keymap.c +++ b/keyboards/input_club/k_type/keymaps/default/keymap.c | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | // Copyright 2023 QMK | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 1 | #include QMK_KEYBOARD_H | 4 | #include QMK_KEYBOARD_H |
| 2 | 5 | ||
| 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 6 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
diff --git a/keyboards/system76/launch_1/rgb_matrix_kb.inc b/keyboards/system76/launch_1/rgb_matrix_kb.inc index 02de10ed50..f29183dde0 100644 --- a/keyboards/system76/launch_1/rgb_matrix_kb.inc +++ b/keyboards/system76/launch_1/rgb_matrix_kb.inc | |||
| @@ -22,6 +22,7 @@ RGB_MATRIX_EFFECT(unlocked) | |||
| 22 | #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS | 22 | #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS |
| 23 | 23 | ||
| 24 | #include "dynamic_keymap.h" | 24 | #include "dynamic_keymap.h" |
| 25 | #include "action_layer.h" | ||
| 25 | 26 | ||
| 26 | static bool active_keys_initialized = false; | 27 | static bool active_keys_initialized = false; |
| 27 | static uint8_t active_keys_table[RGB_MATRIX_LED_COUNT] = {0}; | 28 | static uint8_t active_keys_table[RGB_MATRIX_LED_COUNT] = {0}; |
diff --git a/keyboards/system76/system76_ec.c b/keyboards/system76/system76_ec.c index 6301659072..1b7955e19b 100644 --- a/keyboards/system76/system76_ec.c +++ b/keyboards/system76/system76_ec.c | |||
| @@ -22,6 +22,12 @@ | |||
| 22 | #include "raw_hid.h" | 22 | #include "raw_hid.h" |
| 23 | #include "rgb_matrix.h" | 23 | #include "rgb_matrix.h" |
| 24 | #include "version.h" | 24 | #include "version.h" |
| 25 | #include "keyboard.h" | ||
| 26 | #include "eeprom.h" | ||
| 27 | #include "matrix.h" | ||
| 28 | #include "action_layer.h" | ||
| 29 | #include "bootloader.h" | ||
| 30 | #include "wait.h" | ||
| 25 | 31 | ||
| 26 | enum Command { | 32 | enum Command { |
| 27 | CMD_PROBE = 1, // Probe for System76 EC protocol | 33 | CMD_PROBE = 1, // Probe for System76 EC protocol |
diff --git a/platforms/avr/drivers/audio_pwm_hardware.c b/platforms/avr/drivers/audio_pwm_hardware.c index 2fc448ea58..6799cf2fdd 100644 --- a/platforms/avr/drivers/audio_pwm_hardware.c +++ b/platforms/avr/drivers/audio_pwm_hardware.c | |||
| @@ -15,13 +15,9 @@ | |||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #if defined(__AVR__) | ||
| 19 | # include <avr/pgmspace.h> | ||
| 20 | # include <avr/interrupt.h> | ||
| 21 | # include <avr/io.h> | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #include "audio.h" | 18 | #include "audio.h" |
| 19 | #include "gpio.h" | ||
| 20 | #include <avr/interrupt.h> | ||
| 25 | 21 | ||
| 26 | extern bool playing_note; | 22 | extern bool playing_note; |
| 27 | extern bool playing_melody; | 23 | extern bool playing_melody; |
diff --git a/platforms/chibios/drivers/audio_dac_additive.c b/platforms/chibios/drivers/audio_dac_additive.c index d29147ca3b..9a5fe4c336 100644 --- a/platforms/chibios/drivers/audio_dac_additive.c +++ b/platforms/chibios/drivers/audio_dac_additive.c | |||
| @@ -16,8 +16,9 @@ | |||
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include "audio.h" | 18 | #include "audio.h" |
| 19 | #include <ch.h> | 19 | #include "gpio.h" |
| 20 | #include <hal.h> | 20 | #include <math.h> |
| 21 | #include "util.h" | ||
| 21 | 22 | ||
| 22 | // Need to disable GCC's "tautological-compare" warning for this file, as it causes issues when running `KEEP_INTERMEDIATES=yes`. Corresponding pop at the end of the file. | 23 | // Need to disable GCC's "tautological-compare" warning for this file, as it causes issues when running `KEEP_INTERMEDIATES=yes`. Corresponding pop at the end of the file. |
| 23 | #pragma GCC diagnostic push | 24 | #pragma GCC diagnostic push |
diff --git a/platforms/chibios/drivers/audio_dac_basic.c b/platforms/chibios/drivers/audio_dac_basic.c index 4ea23a2158..9a3f3fea1f 100644 --- a/platforms/chibios/drivers/audio_dac_basic.c +++ b/platforms/chibios/drivers/audio_dac_basic.c | |||
| @@ -16,8 +16,7 @@ | |||
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include "audio.h" | 18 | #include "audio.h" |
| 19 | #include "ch.h" | 19 | #include "gpio.h" |
| 20 | #include "hal.h" | ||
| 21 | 20 | ||
| 22 | // Need to disable GCC's "tautological-compare" warning for this file, as it causes issues when running `KEEP_INTERMEDIATES=yes`. Corresponding pop at the end of the file. | 21 | // Need to disable GCC's "tautological-compare" warning for this file, as it causes issues when running `KEEP_INTERMEDIATES=yes`. Corresponding pop at the end of the file. |
| 23 | #pragma GCC diagnostic push | 22 | #pragma GCC diagnostic push |
diff --git a/platforms/chibios/drivers/audio_pwm_hardware.c b/platforms/chibios/drivers/audio_pwm_hardware.c index 54dac46605..40d891326f 100644 --- a/platforms/chibios/drivers/audio_pwm_hardware.c +++ b/platforms/chibios/drivers/audio_pwm_hardware.c | |||
| @@ -12,8 +12,7 @@ | |||
| 12 | // function. | 12 | // function. |
| 13 | 13 | ||
| 14 | #include "audio.h" | 14 | #include "audio.h" |
| 15 | #include "ch.h" | 15 | #include "gpio.h" |
| 16 | #include "hal.h" | ||
| 17 | 16 | ||
| 18 | #if !defined(AUDIO_PIN) | 17 | #if !defined(AUDIO_PIN) |
| 19 | # error "Audio feature enabled, but no pin selected - see docs/feature_audio under the ARM PWM settings" | 18 | # error "Audio feature enabled, but no pin selected - see docs/feature_audio under the ARM PWM settings" |
diff --git a/platforms/chibios/drivers/audio_pwm_software.c b/platforms/chibios/drivers/audio_pwm_software.c index e01f86ea52..663a9eca16 100644 --- a/platforms/chibios/drivers/audio_pwm_software.c +++ b/platforms/chibios/drivers/audio_pwm_software.c | |||
| @@ -25,8 +25,7 @@ this driver uses the chibios-PWM system to produce a square-wave on any given ou | |||
| 25 | 25 | ||
| 26 | */ | 26 | */ |
| 27 | #include "audio.h" | 27 | #include "audio.h" |
| 28 | #include "ch.h" | 28 | #include "gpio.h" |
| 29 | #include "hal.h" | ||
| 30 | 29 | ||
| 31 | #if !defined(AUDIO_PIN) | 30 | #if !defined(AUDIO_PIN) |
| 32 | # error "Audio feature enabled, but no pin selected - see docs/feature_audio under the ARM PWM settings" | 31 | # error "Audio feature enabled, but no pin selected - see docs/feature_audio under the ARM PWM settings" |
diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index 0300483a93..b9b21066cb 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c | |||
| @@ -583,3 +583,6 @@ uint16_t audio_duration_to_ms(uint16_t duration_bpm) { | |||
| 583 | uint16_t audio_ms_to_duration(uint16_t duration_ms) { | 583 | uint16_t audio_ms_to_duration(uint16_t duration_ms) { |
| 584 | return ((uint32_t)duration_ms * 2 * note_tempo) / 1875; | 584 | return ((uint32_t)duration_ms * 2 * note_tempo) / 1875; |
| 585 | } | 585 | } |
| 586 | |||
| 587 | __attribute__((weak)) void audio_on_user(void) {} | ||
| 588 | __attribute__((weak)) void audio_off_user(void) {} | ||
diff --git a/quantum/audio/audio.h b/quantum/audio/audio.h index 75016a1100..a4a908b43c 100644 --- a/quantum/audio/audio.h +++ b/quantum/audio/audio.h | |||
| @@ -21,12 +21,6 @@ | |||
| 21 | #include "musical_notes.h" | 21 | #include "musical_notes.h" |
| 22 | #include "song_list.h" | 22 | #include "song_list.h" |
| 23 | #include "voices.h" | 23 | #include "voices.h" |
| 24 | #include "quantum.h" | ||
| 25 | #include <math.h> | ||
| 26 | |||
| 27 | #if defined(__AVR__) | ||
| 28 | # include <avr/io.h> | ||
| 29 | #endif | ||
| 30 | 24 | ||
| 31 | #if defined(AUDIO_DRIVER_PWM) | 25 | #if defined(AUDIO_DRIVER_PWM) |
| 32 | # include "audio_pwm.h" | 26 | # include "audio_pwm.h" |
| @@ -280,3 +274,6 @@ bool audio_update_state(void); | |||
| 280 | #define increase_tempo(t) audio_increase_tempo(t) | 274 | #define increase_tempo(t) audio_increase_tempo(t) |
| 281 | #define decrease_tempo(t) audio_decrease_tempo(t) | 275 | #define decrease_tempo(t) audio_decrease_tempo(t) |
| 282 | // vibrato functions are not used in any keyboards | 276 | // vibrato functions are not used in any keyboards |
| 277 | |||
| 278 | void audio_on_user(void); | ||
| 279 | void audio_off_user(void); | ||
diff --git a/quantum/audio/muse.c b/quantum/audio/muse.c index 01b95671fd..4c23cd7348 100644 --- a/quantum/audio/muse.c +++ b/quantum/audio/muse.c | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | #include "muse.h" | 1 | #include "muse.h" |
| 2 | 2 | ||
| 3 | #include <stdbool.h> | ||
| 4 | |||
| 3 | enum { MUSE_OFF, MUSE_ON, MUSE_C_1_2, MUSE_C1, MUSE_C2, MUSE_C4, MUSE_C8, MUSE_C3, MUSE_C6, MUSE_B1, MUSE_B2, MUSE_B3, MUSE_B4, MUSE_B5, MUSE_B6, MUSE_B7, MUSE_B8, MUSE_B9, MUSE_B10, MUSE_B11, MUSE_B12, MUSE_B13, MUSE_B14, MUSE_B15, MUSE_B16, MUSE_B17, MUSE_B18, MUSE_B19, MUSE_B20, MUSE_B21, MUSE_B22, MUSE_B23, MUSE_B24, MUSE_B25, MUSE_B26, MUSE_B27, MUSE_B28, MUSE_B29, MUSE_B30, MUSE_B31 }; | 5 | enum { MUSE_OFF, MUSE_ON, MUSE_C_1_2, MUSE_C1, MUSE_C2, MUSE_C4, MUSE_C8, MUSE_C3, MUSE_C6, MUSE_B1, MUSE_B2, MUSE_B3, MUSE_B4, MUSE_B5, MUSE_B6, MUSE_B7, MUSE_B8, MUSE_B9, MUSE_B10, MUSE_B11, MUSE_B12, MUSE_B13, MUSE_B14, MUSE_B15, MUSE_B16, MUSE_B17, MUSE_B18, MUSE_B19, MUSE_B20, MUSE_B21, MUSE_B22, MUSE_B23, MUSE_B24, MUSE_B25, MUSE_B26, MUSE_B27, MUSE_B28, MUSE_B29, MUSE_B30, MUSE_B31 }; |
| 4 | 6 | ||
| 5 | bool number_of_ones_to_bool[16] = {1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1}; | 7 | bool number_of_ones_to_bool[16] = {1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1}; |
diff --git a/quantum/audio/muse.h b/quantum/audio/muse.h index ad2f96e43a..7b289cac6c 100644 --- a/quantum/audio/muse.h +++ b/quantum/audio/muse.h | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #include "quantum.h" | 3 | #include <stdint.h> |
| 4 | #include "process_audio.h" | ||
| 5 | 4 | ||
| 6 | uint8_t muse_clock_pulse(void); | 5 | uint8_t muse_clock_pulse(void); |
diff --git a/quantum/audio/voices.c b/quantum/audio/voices.c index 01f257f4d4..4f511c93ba 100644 --- a/quantum/audio/voices.c +++ b/quantum/audio/voices.c | |||
| @@ -16,7 +16,9 @@ | |||
| 16 | */ | 16 | */ |
| 17 | #include "voices.h" | 17 | #include "voices.h" |
| 18 | #include "audio.h" | 18 | #include "audio.h" |
| 19 | #include "timer.h" | ||
| 19 | #include <stdlib.h> | 20 | #include <stdlib.h> |
| 21 | #include <math.h> | ||
| 20 | 22 | ||
| 21 | uint8_t note_timbre = TIMBRE_DEFAULT; | 23 | uint8_t note_timbre = TIMBRE_DEFAULT; |
| 22 | bool glissando = false; | 24 | bool glissando = false; |
diff --git a/quantum/bootmagic/bootmagic_lite.c b/quantum/bootmagic/bootmagic_lite.c index f63c71fc6b..efce6bfd12 100644 --- a/quantum/bootmagic/bootmagic_lite.c +++ b/quantum/bootmagic/bootmagic_lite.c | |||
| @@ -13,7 +13,12 @@ | |||
| 13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | #include "quantum.h" | 16 | #include "bootmagic.h" |
| 17 | #include "matrix.h" | ||
| 18 | #include "keyboard.h" | ||
| 19 | #include "wait.h" | ||
| 20 | #include "eeconfig.h" | ||
| 21 | #include "bootloader.h" | ||
| 17 | 22 | ||
| 18 | /** \brief Reset eeprom | 23 | /** \brief Reset eeprom |
| 19 | * | 24 | * |
diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index 2030c82a1b..4c95128337 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c | |||
| @@ -14,14 +14,16 @@ | |||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include "keymap_introspection.h" // to get keymaps[][][] | ||
| 18 | #include "eeprom.h" | ||
| 19 | #include "progmem.h" // to read default from flash | ||
| 20 | #include "quantum.h" // for send_string() | ||
| 21 | #include "dynamic_keymap.h" | 17 | #include "dynamic_keymap.h" |
| 18 | #include "keymap_introspection.h" | ||
| 19 | #include "action.h" | ||
| 20 | #include "eeprom.h" | ||
| 21 | #include "progmem.h" | ||
| 22 | #include "send_string.h" | ||
| 23 | #include "keycodes.h" | ||
| 22 | 24 | ||
| 23 | #ifdef VIA_ENABLE | 25 | #ifdef VIA_ENABLE |
| 24 | # include "via.h" // for VIA_EEPROM_CONFIG_END | 26 | # include "via.h" |
| 25 | # define DYNAMIC_KEYMAP_EEPROM_START (VIA_EEPROM_CONFIG_END) | 27 | # define DYNAMIC_KEYMAP_EEPROM_START (VIA_EEPROM_CONFIG_END) |
| 26 | #else | 28 | #else |
| 27 | # define DYNAMIC_KEYMAP_EEPROM_START (EECONFIG_SIZE) | 29 | # define DYNAMIC_KEYMAP_EEPROM_START (EECONFIG_SIZE) |
diff --git a/quantum/encoder.c b/quantum/encoder.c index 1046fe6cc3..7ab194ed52 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c | |||
| @@ -16,6 +16,11 @@ | |||
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include "encoder.h" | 18 | #include "encoder.h" |
| 19 | #include "keyboard.h" | ||
| 20 | #include "action.h" | ||
| 21 | #include "keycodes.h" | ||
| 22 | #include "wait.h" | ||
| 23 | |||
| 19 | #ifdef SPLIT_KEYBOARD | 24 | #ifdef SPLIT_KEYBOARD |
| 20 | # include "split_util.h" | 25 | # include "split_util.h" |
| 21 | #endif | 26 | #endif |
diff --git a/quantum/encoder.h b/quantum/encoder.h index 7644853b30..1cbac98cb5 100644 --- a/quantum/encoder.h +++ b/quantum/encoder.h | |||
| @@ -17,7 +17,9 @@ | |||
| 17 | 17 | ||
| 18 | #pragma once | 18 | #pragma once |
| 19 | 19 | ||
| 20 | #include "quantum.h" | 20 | #include <stdint.h> |
| 21 | #include <stdbool.h> | ||
| 22 | #include "gpio.h" | ||
| 21 | #include "util.h" | 23 | #include "util.h" |
| 22 | 24 | ||
| 23 | void encoder_init(void); | 25 | void encoder_init(void); |
diff --git a/quantum/encoder/tests/encoder_tests_split_role.cpp b/quantum/encoder/tests/encoder_tests_split_role.cpp index 02264067f4..0ab7bfc2a7 100644 --- a/quantum/encoder/tests/encoder_tests_split_role.cpp +++ b/quantum/encoder/tests/encoder_tests_split_role.cpp | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | extern "C" { | 23 | extern "C" { |
| 24 | #include "encoder.h" | 24 | #include "encoder.h" |
| 25 | #include "keyboard.h" | ||
| 25 | #include "encoder/tests/mock_split.h" | 26 | #include "encoder/tests/mock_split.h" |
| 26 | } | 27 | } |
| 27 | 28 | ||
diff --git a/quantum/keyboard.c b/quantum/keyboard.c index 5115709748..c2ca15d52d 100644 --- a/quantum/keyboard.c +++ b/quantum/keyboard.c | |||
| @@ -16,8 +16,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include <stdint.h> | 18 | #include <stdint.h> |
| 19 | #include "quantum.h" | ||
| 20 | #include "keyboard.h" | 19 | #include "keyboard.h" |
| 20 | #include "keycode_config.h" | ||
| 21 | #include "matrix.h" | 21 | #include "matrix.h" |
| 22 | #include "keymap_introspection.h" | 22 | #include "keymap_introspection.h" |
| 23 | #include "magic.h" | 23 | #include "magic.h" |
| @@ -33,6 +33,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 33 | #include "sendchar.h" | 33 | #include "sendchar.h" |
| 34 | #include "eeconfig.h" | 34 | #include "eeconfig.h" |
| 35 | #include "action_layer.h" | 35 | #include "action_layer.h" |
| 36 | #ifdef AUDIO_ENABLE | ||
| 37 | # include "audio.h" | ||
| 38 | #endif | ||
| 39 | #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) | ||
| 40 | # include "process_music.h" | ||
| 41 | #endif | ||
| 36 | #ifdef BACKLIGHT_ENABLE | 42 | #ifdef BACKLIGHT_ENABLE |
| 37 | # include "backlight.h" | 43 | # include "backlight.h" |
| 38 | #endif | 44 | #endif |
| @@ -54,9 +60,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 54 | #ifdef ENCODER_ENABLE | 60 | #ifdef ENCODER_ENABLE |
| 55 | # include "encoder.h" | 61 | # include "encoder.h" |
| 56 | #endif | 62 | #endif |
| 63 | #ifdef HAPTIC_ENABLE | ||
| 64 | # include "haptic.h" | ||
| 65 | #endif | ||
| 66 | #ifdef AUTO_SHIFT_ENABLE | ||
| 67 | # include "process_auto_shift.h" | ||
| 68 | #endif | ||
| 69 | #ifdef COMBO_ENABLE | ||
| 70 | # include "process_combo.h" | ||
| 71 | #endif | ||
| 72 | #ifdef TAP_DANCE_ENABLE | ||
| 73 | # include "process_tap_dance.h" | ||
| 74 | #endif | ||
| 57 | #ifdef STENO_ENABLE | 75 | #ifdef STENO_ENABLE |
| 58 | # include "process_steno.h" | 76 | # include "process_steno.h" |
| 59 | #endif | 77 | #endif |
| 78 | #ifdef KEY_OVERRIDE_ENABLE | ||
| 79 | # include "process_key_override.h" | ||
| 80 | #endif | ||
| 81 | #ifdef SECURE_ENABLE | ||
| 82 | # include "secure.h" | ||
| 83 | #endif | ||
| 60 | #ifdef POINTING_DEVICE_ENABLE | 84 | #ifdef POINTING_DEVICE_ENABLE |
| 61 | # include "pointing_device.h" | 85 | # include "pointing_device.h" |
| 62 | #endif | 86 | #endif |
| @@ -64,7 +88,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 64 | # include "process_midi.h" | 88 | # include "process_midi.h" |
| 65 | #endif | 89 | #endif |
| 66 | #ifdef JOYSTICK_ENABLE | 90 | #ifdef JOYSTICK_ENABLE |
| 67 | # include "process_joystick.h" | 91 | # include "joystick.h" |
| 68 | #endif | 92 | #endif |
| 69 | #ifdef HD44780_ENABLE | 93 | #ifdef HD44780_ENABLE |
| 70 | # include "hd44780.h" | 94 | # include "hd44780.h" |
| @@ -108,6 +132,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 108 | #ifdef LEADER_ENABLE | 132 | #ifdef LEADER_ENABLE |
| 109 | # include "leader.h" | 133 | # include "leader.h" |
| 110 | #endif | 134 | #endif |
| 135 | #ifdef UNICODE_COMMON_ENABLE | ||
| 136 | # include "unicode.h" | ||
| 137 | #endif | ||
| 138 | #ifdef WPM_ENABLE | ||
| 139 | # include "wpm.h" | ||
| 140 | #endif | ||
| 111 | 141 | ||
| 112 | static uint32_t last_input_modification_time = 0; | 142 | static uint32_t last_input_modification_time = 0; |
| 113 | uint32_t last_input_activity_time(void) { | 143 | uint32_t last_input_activity_time(void) { |
diff --git a/quantum/keyboard.h b/quantum/keyboard.h index bf1890d10b..5ea57815a7 100644 --- a/quantum/keyboard.h +++ b/quantum/keyboard.h | |||
| @@ -20,6 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 20 | #include <stdbool.h> | 20 | #include <stdbool.h> |
| 21 | #include <stdint.h> | 21 | #include <stdint.h> |
| 22 | 22 | ||
| 23 | #include "timer.h" | ||
| 24 | |||
| 23 | #ifdef __cplusplus | 25 | #ifdef __cplusplus |
| 24 | extern "C" { | 26 | extern "C" { |
| 25 | #endif | 27 | #endif |
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 0492e6fd1c..9a67fad278 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c | |||
| @@ -22,7 +22,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 22 | #include "action_layer.h" | 22 | #include "action_layer.h" |
| 23 | #include "action.h" | 23 | #include "action.h" |
| 24 | #include "debug.h" | 24 | #include "debug.h" |
| 25 | #include "quantum.h" | 25 | #include "keycode_config.h" |
| 26 | #include "quantum_keycodes.h" | ||
| 27 | |||
| 28 | #ifdef ENCODER_MAP_ENABLE | ||
| 29 | # include "encoder.h" | ||
| 30 | #endif | ||
| 26 | 31 | ||
| 27 | #ifdef BACKLIGHT_ENABLE | 32 | #ifdef BACKLIGHT_ENABLE |
| 28 | # include "backlight.h" | 33 | # include "backlight.h" |
diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index 4b692d1904..1676a60aa3 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c | |||
| @@ -20,8 +20,13 @@ | |||
| 20 | #include "led_matrix.h" | 20 | #include "led_matrix.h" |
| 21 | #include "progmem.h" | 21 | #include "progmem.h" |
| 22 | #include "eeprom.h" | 22 | #include "eeprom.h" |
| 23 | #include "eeconfig.h" | ||
| 24 | #include "keyboard.h" | ||
| 25 | #include "sync_timer.h" | ||
| 26 | #include "debug.h" | ||
| 23 | #include <string.h> | 27 | #include <string.h> |
| 24 | #include <math.h> | 28 | #include <math.h> |
| 29 | #include <stdlib.h> | ||
| 25 | #include "led_tables.h" | 30 | #include "led_tables.h" |
| 26 | 31 | ||
| 27 | #include <lib/lib8tion/lib8tion.h> | 32 | #include <lib/lib8tion/lib8tion.h> |
diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h index 9091f6890b..c2533ca49c 100644 --- a/quantum/led_matrix/led_matrix.h +++ b/quantum/led_matrix/led_matrix.h | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | #include <stdint.h> | 23 | #include <stdint.h> |
| 24 | #include <stdbool.h> | 24 | #include <stdbool.h> |
| 25 | #include "led_matrix_types.h" | 25 | #include "led_matrix_types.h" |
| 26 | #include "quantum.h" | 26 | #include "keyboard.h" |
| 27 | 27 | ||
| 28 | #ifdef IS31FL3731 | 28 | #ifdef IS31FL3731 |
| 29 | # include "is31fl3731-simple.h" | 29 | # include "is31fl3731-simple.h" |
diff --git a/quantum/matrix.c b/quantum/matrix.c index 97d41caedd..f087a215d4 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c | |||
| @@ -20,7 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 20 | #include "util.h" | 20 | #include "util.h" |
| 21 | #include "matrix.h" | 21 | #include "matrix.h" |
| 22 | #include "debounce.h" | 22 | #include "debounce.h" |
| 23 | #include "quantum.h" | 23 | #include "atomic_util.h" |
| 24 | |||
| 24 | #ifdef SPLIT_KEYBOARD | 25 | #ifdef SPLIT_KEYBOARD |
| 25 | # include "split_common/split_util.h" | 26 | # include "split_common/split_util.h" |
| 26 | # include "split_common/transactions.h" | 27 | # include "split_common/transactions.h" |
diff --git a/quantum/matrix_common.c b/quantum/matrix_common.c index 3173351888..d02c527caa 100644 --- a/quantum/matrix_common.c +++ b/quantum/matrix_common.c | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | #include "quantum.h" | ||
| 2 | #include "matrix.h" | 1 | #include "matrix.h" |
| 3 | #include "debounce.h" | 2 | #include "debounce.h" |
| 4 | #include "wait.h" | 3 | #include "wait.h" |
| 5 | #include "print.h" | 4 | #include "print.h" |
| 6 | #include "debug.h" | 5 | #include "debug.h" |
| 6 | |||
| 7 | #ifdef SPLIT_KEYBOARD | 7 | #ifdef SPLIT_KEYBOARD |
| 8 | # include "split_common/split_util.h" | 8 | # include "split_common/split_util.h" |
| 9 | # include "split_common/transactions.h" | 9 | # include "split_common/transactions.h" |
diff --git a/quantum/midi/qmk_midi.c b/quantum/midi/qmk_midi.c index 688259784c..43ebd72937 100644 --- a/quantum/midi/qmk_midi.c +++ b/quantum/midi/qmk_midi.c | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | #ifdef AUDIO_ENABLE | 8 | #ifdef AUDIO_ENABLE |
| 9 | # include "audio.h" | 9 | # include "audio.h" |
| 10 | # include <math.h> | ||
| 10 | #endif | 11 | #endif |
| 11 | 12 | ||
| 12 | /******************************************************************************* | 13 | /******************************************************************************* |
diff --git a/quantum/pointing_device/pointing_device_auto_mouse.c b/quantum/pointing_device/pointing_device_auto_mouse.c index b008d18db5..fc3106e37e 100644 --- a/quantum/pointing_device/pointing_device_auto_mouse.c +++ b/quantum/pointing_device/pointing_device_auto_mouse.c | |||
| @@ -18,6 +18,9 @@ | |||
| 18 | #ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE | 18 | #ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE |
| 19 | 19 | ||
| 20 | # include "pointing_device_auto_mouse.h" | 20 | # include "pointing_device_auto_mouse.h" |
| 21 | # include "debug.h" | ||
| 22 | # include "action_util.h" | ||
| 23 | # include "quantum_keycodes.h" | ||
| 21 | 24 | ||
| 22 | /* local data structure for tracking auto mouse */ | 25 | /* local data structure for tracking auto mouse */ |
| 23 | static auto_mouse_context_t auto_mouse_context = { | 26 | static auto_mouse_context_t auto_mouse_context = { |
diff --git a/quantum/pointing_device/pointing_device_auto_mouse.h b/quantum/pointing_device/pointing_device_auto_mouse.h index 7db63bc6b8..1343855e00 100644 --- a/quantum/pointing_device/pointing_device_auto_mouse.h +++ b/quantum/pointing_device/pointing_device_auto_mouse.h | |||
| @@ -16,11 +16,14 @@ | |||
| 16 | 16 | ||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | #include <string.h> | 19 | #include <stdint.h> |
| 20 | 20 | #include <stdbool.h> | |
| 21 | #include "quantum.h" | ||
| 22 | #include "pointing_device.h" | 21 | #include "pointing_device.h" |
| 23 | #include "print.h" | 22 | #include "keycodes.h" |
| 23 | #include "action.h" | ||
| 24 | #include "report.h" | ||
| 25 | #include "action_layer.h" | ||
| 26 | #include "action_tapping.h" | ||
| 24 | 27 | ||
| 25 | /* check settings and set defaults */ | 28 | /* check settings and set defaults */ |
| 26 | #ifndef POINTING_DEVICE_AUTO_MOUSE_ENABLE | 29 | #ifndef POINTING_DEVICE_AUTO_MOUSE_ENABLE |
diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c index c189dd02b7..ef2f52c9f1 100644 --- a/quantum/process_keycode/process_audio.c +++ b/quantum/process_keycode/process_audio.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | #include "audio.h" | 1 | #include "audio.h" |
| 2 | #include "process_audio.h" | 2 | #include "process_audio.h" |
| 3 | #include <math.h> | ||
| 3 | 4 | ||
| 4 | #ifndef VOICE_CHANGE_SONG | 5 | #ifndef VOICE_CHANGE_SONG |
| 5 | # define VOICE_CHANGE_SONG SONG(VOICE_CHANGE_SOUND) | 6 | # define VOICE_CHANGE_SONG SONG(VOICE_CHANGE_SOUND) |
| @@ -61,6 +62,3 @@ void process_audio_noteoff(uint8_t note) { | |||
| 61 | void process_audio_all_notes_off(void) { | 62 | void process_audio_all_notes_off(void) { |
| 62 | stop_all_notes(); | 63 | stop_all_notes(); |
| 63 | } | 64 | } |
| 64 | |||
| 65 | __attribute__((weak)) void audio_on_user(void) {} | ||
| 66 | __attribute__((weak)) void audio_off_user(void) {} | ||
diff --git a/quantum/process_keycode/process_audio.h b/quantum/process_keycode/process_audio.h index c80136f2c2..69e201e447 100644 --- a/quantum/process_keycode/process_audio.h +++ b/quantum/process_keycode/process_audio.h | |||
| @@ -10,6 +10,3 @@ bool process_audio(uint16_t keycode, keyrecord_t *record); | |||
| 10 | void process_audio_noteon(uint8_t note); | 10 | void process_audio_noteon(uint8_t note); |
| 11 | void process_audio_noteoff(uint8_t note); | 11 | void process_audio_noteoff(uint8_t note); |
| 12 | void process_audio_all_notes_off(void); | 12 | void process_audio_all_notes_off(void); |
| 13 | |||
| 14 | void audio_on_user(void); | ||
| 15 | void audio_off_user(void); | ||
diff --git a/quantum/process_keycode/process_clicky.c b/quantum/process_keycode/process_clicky.c index b662a3f2f4..0ee58282e6 100644 --- a/quantum/process_keycode/process_clicky.c +++ b/quantum/process_keycode/process_clicky.c | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | #include "audio.h" | ||
| 2 | #include "process_clicky.h" | 1 | #include "process_clicky.h" |
| 2 | #include "audio.h" | ||
| 3 | #include "eeconfig.h" | ||
| 4 | #include <stdlib.h> | ||
| 3 | 5 | ||
| 4 | #ifdef AUDIO_CLICKY | 6 | #ifdef AUDIO_CLICKY |
| 5 | 7 | ||
diff --git a/quantum/process_keycode/process_key_override.c b/quantum/process_keycode/process_key_override.c index 6ce1e4d925..264e2562b8 100644 --- a/quantum/process_keycode/process_key_override.c +++ b/quantum/process_keycode/process_key_override.c | |||
| @@ -19,6 +19,10 @@ | |||
| 19 | #include "report.h" | 19 | #include "report.h" |
| 20 | #include "timer.h" | 20 | #include "timer.h" |
| 21 | #include "debug.h" | 21 | #include "debug.h" |
| 22 | #include "wait.h" | ||
| 23 | #include "action_util.h" | ||
| 24 | #include "quantum.h" | ||
| 25 | #include "quantum_keycodes.h" | ||
| 22 | 26 | ||
| 23 | #ifndef KEY_OVERRIDE_REPEAT_DELAY | 27 | #ifndef KEY_OVERRIDE_REPEAT_DELAY |
| 24 | # define KEY_OVERRIDE_REPEAT_DELAY 500 | 28 | # define KEY_OVERRIDE_REPEAT_DELAY 500 |
diff --git a/quantum/repeat_key.c b/quantum/repeat_key.c index 0689c6d454..4567428723 100644 --- a/quantum/repeat_key.c +++ b/quantum/repeat_key.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | // limitations under the License. | 13 | // limitations under the License. |
| 14 | 14 | ||
| 15 | #include "repeat_key.h" | 15 | #include "repeat_key.h" |
| 16 | #include "quantum_keycodes.h" | ||
| 16 | 17 | ||
| 17 | // Variables saving the state of the last key press. | 18 | // Variables saving the state of the last key press. |
| 18 | static keyrecord_t last_record = {0}; | 19 | static keyrecord_t last_record = {0}; |
diff --git a/quantum/repeat_key.h b/quantum/repeat_key.h index 06e8364529..8084be24ad 100644 --- a/quantum/repeat_key.h +++ b/quantum/repeat_key.h | |||
| @@ -14,7 +14,10 @@ | |||
| 14 | 14 | ||
| 15 | #pragma once | 15 | #pragma once |
| 16 | 16 | ||
| 17 | #include "quantum.h" | 17 | #include <stdint.h> |
| 18 | #include <stdbool.h> | ||
| 19 | #include "action.h" | ||
| 20 | #include "keyboard.h" | ||
| 18 | 21 | ||
| 19 | uint16_t get_last_keycode(void); /**< Keycode of the last key. */ | 22 | uint16_t get_last_keycode(void); /**< Keycode of the last key. */ |
| 20 | uint8_t get_last_mods(void); /**< Mods active with the last key. */ | 23 | uint8_t get_last_mods(void); /**< Mods active with the last key. */ |
diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index 1680389793..96be615162 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c | |||
| @@ -19,8 +19,13 @@ | |||
| 19 | #include "rgb_matrix.h" | 19 | #include "rgb_matrix.h" |
| 20 | #include "progmem.h" | 20 | #include "progmem.h" |
| 21 | #include "eeprom.h" | 21 | #include "eeprom.h" |
| 22 | #include "eeconfig.h" | ||
| 23 | #include "keyboard.h" | ||
| 24 | #include "sync_timer.h" | ||
| 25 | #include "debug.h" | ||
| 22 | #include <string.h> | 26 | #include <string.h> |
| 23 | #include <math.h> | 27 | #include <math.h> |
| 28 | #include <stdlib.h> | ||
| 24 | 29 | ||
| 25 | #include <lib/lib8tion/lib8tion.h> | 30 | #include <lib/lib8tion/lib8tion.h> |
| 26 | 31 | ||
diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h index 83851d8995..38040fb0cc 100644 --- a/quantum/rgb_matrix/rgb_matrix.h +++ b/quantum/rgb_matrix/rgb_matrix.h | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | #include <stdbool.h> | 22 | #include <stdbool.h> |
| 23 | #include "rgb_matrix_types.h" | 23 | #include "rgb_matrix_types.h" |
| 24 | #include "color.h" | 24 | #include "color.h" |
| 25 | #include "quantum.h" | 25 | #include "keyboard.h" |
| 26 | 26 | ||
| 27 | #ifdef IS31FL3731 | 27 | #ifdef IS31FL3731 |
| 28 | # include "is31fl3731.h" | 28 | # include "is31fl3731.h" |
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index 6de20ac8a5..7bd274ee99 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include "rgb_matrix.h" | 17 | #include "rgb_matrix.h" |
| 18 | #include "util.h" | ||
| 18 | 19 | ||
| 19 | /* Each driver needs to define the struct | 20 | /* Each driver needs to define the struct |
| 20 | * const rgb_matrix_driver_t rgb_matrix_driver; | 21 | * const rgb_matrix_driver_t rgb_matrix_driver; |
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index a431383454..87838c3195 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | #include "keyboard.h" | 18 | #include "keyboard.h" |
| 19 | #include "timer.h" | 19 | #include "timer.h" |
| 20 | #include "transport.h" | 20 | #include "transport.h" |
| 21 | #include "quantum.h" | ||
| 22 | #include "wait.h" | 21 | #include "wait.h" |
| 22 | #include "debug.h" | ||
| 23 | #include "usb_util.h" | 23 | #include "usb_util.h" |
| 24 | 24 | ||
| 25 | #ifdef EE_HANDS | 25 | #ifdef EE_HANDS |
diff --git a/quantum/split_common/split_util.h b/quantum/split_common/split_util.h index 5c9a260a14..ab42c85e9f 100644 --- a/quantum/split_common/split_util.h +++ b/quantum/split_common/split_util.h | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | 2 | ||
| 3 | #include <stdbool.h> | 3 | #include <stdbool.h> |
| 4 | #include <stdint.h> | 4 | #include <stdint.h> |
| 5 | #include <stdlib.h> | ||
| 6 | 5 | ||
| 7 | #include "matrix.h" | 6 | #include "matrix.h" |
| 8 | 7 | ||
diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c index 8cd018a6ec..2b9423cd63 100644 --- a/quantum/split_common/transactions.c +++ b/quantum/split_common/transactions.c | |||
| @@ -20,13 +20,50 @@ | |||
| 20 | #include "crc.h" | 20 | #include "crc.h" |
| 21 | #include "debug.h" | 21 | #include "debug.h" |
| 22 | #include "matrix.h" | 22 | #include "matrix.h" |
| 23 | #include "quantum.h" | 23 | #include "host.h" |
| 24 | #include "action_util.h" | ||
| 25 | #include "sync_timer.h" | ||
| 26 | #include "wait.h" | ||
| 24 | #include "transactions.h" | 27 | #include "transactions.h" |
| 25 | #include "transport.h" | 28 | #include "transport.h" |
| 26 | #include "transaction_id_define.h" | 29 | #include "transaction_id_define.h" |
| 27 | #include "split_util.h" | 30 | #include "split_util.h" |
| 28 | #include "synchronization_util.h" | 31 | #include "synchronization_util.h" |
| 29 | 32 | ||
| 33 | #ifdef BACKLIGHT_ENABLE | ||
| 34 | # include "backlight.h" | ||
| 35 | #endif | ||
| 36 | #ifdef RGBLIGHT_ENABLE | ||
| 37 | # include "rgblight.h" | ||
| 38 | #endif | ||
| 39 | #ifdef LED_MATRIX_ENABLE | ||
| 40 | # include "led_matrix.h" | ||
| 41 | #endif | ||
| 42 | #ifdef RGB_MATRIX_ENABLE | ||
| 43 | # include "rgb_matrix.h" | ||
| 44 | #endif | ||
| 45 | #ifdef OLED_ENABLE | ||
| 46 | # include "oled_driver.h" | ||
| 47 | #endif | ||
| 48 | #ifdef ST7565_ENABLE | ||
| 49 | # include "st7565.h" | ||
| 50 | #endif | ||
| 51 | #ifdef ENCODER_ENABLE | ||
| 52 | # include "encoder.h" | ||
| 53 | #endif | ||
| 54 | #ifdef HAPTIC_ENABLE | ||
| 55 | # include "haptic.h" | ||
| 56 | #endif | ||
| 57 | #ifdef POINTING_DEVICE_ENABLE | ||
| 58 | # include "pointing_device.h" | ||
| 59 | #endif | ||
| 60 | #ifdef OS_DETECTION_ENABLE | ||
| 61 | # include "os_detection.h" | ||
| 62 | #endif | ||
| 63 | #ifdef WPM_ENABLE | ||
| 64 | # include "wpm.h" | ||
| 65 | #endif | ||
| 66 | |||
| 30 | #define SYNC_TIMER_OFFSET 2 | 67 | #define SYNC_TIMER_OFFSET 2 |
| 31 | 68 | ||
| 32 | #ifndef FORCED_SYNC_THROTTLE_MS | 69 | #ifndef FORCED_SYNC_THROTTLE_MS |
diff --git a/quantum/split_common/transactions.h b/quantum/split_common/transactions.h index e38ec79ce9..af3e68a15f 100644 --- a/quantum/split_common/transactions.h +++ b/quantum/split_common/transactions.h | |||
| @@ -16,8 +16,8 @@ | |||
| 16 | 16 | ||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | #include "stdint.h" | 19 | #include <stdint.h> |
| 20 | #include "stdbool.h" | 20 | #include <stdbool.h> |
| 21 | 21 | ||
| 22 | #include "matrix.h" | 22 | #include "matrix.h" |
| 23 | #include "transaction_id_define.h" | 23 | #include "transaction_id_define.h" |
diff --git a/quantum/split_common/transport.h b/quantum/split_common/transport.h index a3d6f1dfe9..2e2b918d45 100644 --- a/quantum/split_common/transport.h +++ b/quantum/split_common/transport.h | |||
| @@ -16,8 +16,8 @@ | |||
| 16 | 16 | ||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | #include "stdint.h" | 19 | #include <stdint.h> |
| 20 | #include "stdbool.h" | 20 | #include <stdbool.h> |
| 21 | 21 | ||
| 22 | #include "progmem.h" | 22 | #include "progmem.h" |
| 23 | #include "action_layer.h" | 23 | #include "action_layer.h" |
diff --git a/quantum/unicode/unicode.c b/quantum/unicode/unicode.c index 35cb62e700..f92ba51984 100644 --- a/quantum/unicode/unicode.c +++ b/quantum/unicode/unicode.c | |||
| @@ -25,6 +25,8 @@ | |||
| 25 | #include "wait.h" | 25 | #include "wait.h" |
| 26 | #include "send_string.h" | 26 | #include "send_string.h" |
| 27 | #include "utf8.h" | 27 | #include "utf8.h" |
| 28 | #include "debug.h" | ||
| 29 | #include "quantum.h" | ||
| 28 | 30 | ||
| 29 | #if defined(AUDIO_ENABLE) | 31 | #if defined(AUDIO_ENABLE) |
| 30 | # include "audio.h" | 32 | # include "audio.h" |
diff --git a/quantum/unicode/unicode.h b/quantum/unicode/unicode.h index 06505d87c0..ccf475d57c 100644 --- a/quantum/unicode/unicode.h +++ b/quantum/unicode/unicode.h | |||
| @@ -17,8 +17,7 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | #include <stdint.h> | 19 | #include <stdint.h> |
| 20 | 20 | #include "quantum_keycodes.h" | |
| 21 | #include "quantum.h" | ||
| 22 | 21 | ||
| 23 | typedef union { | 22 | typedef union { |
| 24 | uint8_t raw; | 23 | uint8_t raw; |
diff --git a/quantum/via.c b/quantum/via.c index f4293dacd4..2acd7aa90c 100644 --- a/quantum/via.c +++ b/quantum/via.c | |||
| @@ -22,19 +22,41 @@ | |||
| 22 | # error "DYNAMIC_KEYMAP_ENABLE is not enabled" | 22 | # error "DYNAMIC_KEYMAP_ENABLE is not enabled" |
| 23 | #endif | 23 | #endif |
| 24 | 24 | ||
| 25 | #include "quantum.h" | ||
| 26 | |||
| 27 | #include "via.h" | 25 | #include "via.h" |
| 28 | 26 | ||
| 29 | #include "raw_hid.h" | 27 | #include "raw_hid.h" |
| 30 | #include "dynamic_keymap.h" | 28 | #include "dynamic_keymap.h" |
| 31 | #include "eeprom.h" | 29 | #include "eeprom.h" |
| 30 | #include "eeconfig.h" | ||
| 31 | #include "matrix.h" | ||
| 32 | #include "timer.h" | ||
| 33 | #include "wait.h" | ||
| 32 | #include "version.h" // for QMK_BUILDDATE used in EEPROM magic | 34 | #include "version.h" // for QMK_BUILDDATE used in EEPROM magic |
| 33 | 35 | ||
| 36 | #if defined(AUDIO_ENABLE) | ||
| 37 | # include "audio.h" | ||
| 38 | #endif | ||
| 39 | |||
| 40 | #if defined(BACKLIGHT_ENABLE) | ||
| 41 | # include "backlight.h" | ||
| 42 | #endif | ||
| 43 | |||
| 44 | #if defined(RGBLIGHT_ENABLE) | ||
| 45 | # include "rgblight.h" | ||
| 46 | #endif | ||
| 47 | |||
| 34 | #if (defined(RGB_MATRIX_ENABLE) || defined(LED_MATRIX_ENABLE)) | 48 | #if (defined(RGB_MATRIX_ENABLE) || defined(LED_MATRIX_ENABLE)) |
| 35 | # include <lib/lib8tion/lib8tion.h> | 49 | # include <lib/lib8tion/lib8tion.h> |
| 36 | #endif | 50 | #endif |
| 37 | 51 | ||
| 52 | #if defined(RGB_MATRIX_ENABLE) | ||
| 53 | # include "rgb_matrix.h" | ||
| 54 | #endif | ||
| 55 | |||
| 56 | #if defined(LED_MATRIX_ENABLE) | ||
| 57 | # include "led_matrix.h" | ||
| 58 | #endif | ||
| 59 | |||
| 38 | // Can be called in an overriding via_init_kb() to test if keyboard level code usage of | 60 | // Can be called in an overriding via_init_kb() to test if keyboard level code usage of |
| 39 | // EEPROM is invalid and use/save defaults. | 61 | // EEPROM is invalid and use/save defaults. |
| 40 | bool via_eeprom_is_valid(void) { | 62 | bool via_eeprom_is_valid(void) { |
diff --git a/quantum/via.h b/quantum/via.h index 6c8465b81e..01d4c48b37 100644 --- a/quantum/via.h +++ b/quantum/via.h | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | #include "eeconfig.h" // for EECONFIG_SIZE | 19 | #include "eeconfig.h" // for EECONFIG_SIZE |
| 20 | #include "action.h" | ||
| 20 | 21 | ||
| 21 | // Keyboard level code can change where VIA stores the magic. | 22 | // Keyboard level code can change where VIA stores the magic. |
| 22 | // The magic is the build date YYMMDD encoded as BCD in 3 bytes, | 23 | // The magic is the build date YYMMDD encoded as BCD in 3 bytes, |
diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index 5bed9e0cf4..30817c17b6 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c | |||
| @@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 21 | #include "report.h" | 21 | #include "report.h" |
| 22 | #include "host.h" | 22 | #include "host.h" |
| 23 | #include "host_driver.h" | 23 | #include "host_driver.h" |
| 24 | #include "suspend.h" | ||
| 24 | #include "keycode_config.h" | 25 | #include "keycode_config.h" |
| 25 | #include <string.h> | 26 | #include <string.h> |
| 26 | 27 | ||
diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c index 6069d1e609..0f316b256c 100644 --- a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c +++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c | |||
| @@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 24 | # include "led.h" | 24 | # include "led.h" |
| 25 | # include "rgb_matrix.h" | 25 | # include "rgb_matrix.h" |
| 26 | # include "eeprom.h" | 26 | # include "eeprom.h" |
| 27 | # include "host.h" | ||
| 27 | # include <string.h> | 28 | # include <string.h> |
| 28 | # include <math.h> | 29 | # include <math.h> |
| 29 | 30 | ||
diff --git a/tmk_core/protocol/arm_atsam/spi_master.h b/tmk_core/protocol/arm_atsam/spi_master.h index 26c55128be..80678a5707 100644 --- a/tmk_core/protocol/arm_atsam/spi_master.h +++ b/tmk_core/protocol/arm_atsam/spi_master.h | |||
| @@ -16,7 +16,9 @@ | |||
| 16 | 16 | ||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | #include <stdint.h> | ||
| 19 | #include <stdbool.h> | 20 | #include <stdbool.h> |
| 21 | #include "gpio.h" | ||
| 20 | 22 | ||
| 21 | typedef int16_t spi_status_t; | 23 | typedef int16_t spi_status_t; |
| 22 | 24 | ||
