···1515 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1616 */
17171818-#if defined(__AVR__)
1919-# include <avr/pgmspace.h>
2020-# include <avr/interrupt.h>
2121-# include <avr/io.h>
2222-#endif
2323-2418#include "audio.h"
1919+#include "gpio.h"
2020+#include <avr/interrupt.h>
25212622extern bool playing_note;
2723extern bool playing_melody;
+3-2
platforms/chibios/drivers/audio_dac_additive.c
···1616 */
17171818#include "audio.h"
1919-#include <ch.h>
2020-#include <hal.h>
1919+#include "gpio.h"
2020+#include <math.h>
2121+#include "util.h"
21222223// 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.
2324#pragma GCC diagnostic push
+1-2
platforms/chibios/drivers/audio_dac_basic.c
···1616 */
17171818#include "audio.h"
1919-#include "ch.h"
2020-#include "hal.h"
1919+#include "gpio.h"
21202221// 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.
2322#pragma GCC diagnostic push
+1-2
platforms/chibios/drivers/audio_pwm_hardware.c
···1212// function.
13131414#include "audio.h"
1515-#include "ch.h"
1616-#include "hal.h"
1515+#include "gpio.h"
17161817#if !defined(AUDIO_PIN)
1918# error "Audio feature enabled, but no pin selected - see docs/feature_audio under the ARM PWM settings"
+1-2
platforms/chibios/drivers/audio_pwm_software.c
···25252626 */
2727#include "audio.h"
2828-#include "ch.h"
2929-#include "hal.h"
2828+#include "gpio.h"
30293130#if !defined(AUDIO_PIN)
3231# error "Audio feature enabled, but no pin selected - see docs/feature_audio under the ARM PWM settings"
···1313 * You should have received a copy of the GNU General Public License
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616-#include "quantum.h"
1616+#include "bootmagic.h"
1717+#include "matrix.h"
1818+#include "keyboard.h"
1919+#include "wait.h"
2020+#include "eeconfig.h"
2121+#include "bootloader.h"
17221823/** \brief Reset eeprom
1924 *
+7-5
quantum/dynamic_keymap.c
···1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
16161717-#include "keymap_introspection.h" // to get keymaps[][][]
1818-#include "eeprom.h"
1919-#include "progmem.h" // to read default from flash
2020-#include "quantum.h" // for send_string()
2117#include "dynamic_keymap.h"
1818+#include "keymap_introspection.h"
1919+#include "action.h"
2020+#include "eeprom.h"
2121+#include "progmem.h"
2222+#include "send_string.h"
2323+#include "keycodes.h"
22242325#ifdef VIA_ENABLE
2424-# include "via.h" // for VIA_EEPROM_CONFIG_END
2626+# include "via.h"
2527# define DYNAMIC_KEYMAP_EEPROM_START (VIA_EEPROM_CONFIG_END)
2628#else
2729# define DYNAMIC_KEYMAP_EEPROM_START (EECONFIG_SIZE)
···2020#include "util.h"
2121#include "matrix.h"
2222#include "debounce.h"
2323-#include "quantum.h"
2323+#include "atomic_util.h"
2424+2425#ifdef SPLIT_KEYBOARD
2526# include "split_common/split_util.h"
2627# include "split_common/transactions.h"
+1-1
quantum/matrix_common.c
···11-#include "quantum.h"
21#include "matrix.h"
32#include "debounce.h"
43#include "wait.h"
54#include "print.h"
65#include "debug.h"
66+77#ifdef SPLIT_KEYBOARD
88# include "split_common/split_util.h"
99# include "split_common/transactions.h"
+1
quantum/midi/qmk_midi.c
···7788#ifdef AUDIO_ENABLE
99# include "audio.h"
1010+# include <math.h>
1011#endif
11121213/*******************************************************************************
···1818#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE
19192020# include "pointing_device_auto_mouse.h"
2121+# include "debug.h"
2222+# include "action_util.h"
2323+# include "quantum_keycodes.h"
21242225/* local data structure for tracking auto mouse */
2326static auto_mouse_context_t auto_mouse_context = {
···1313// limitations under the License.
14141515#include "repeat_key.h"
1616+#include "quantum_keycodes.h"
16171718// Variables saving the state of the last key press.
1819static keyrecord_t last_record = {0};
+4-1
quantum/repeat_key.h
···14141515#pragma once
16161717-#include "quantum.h"
1717+#include <stdint.h>
1818+#include <stdbool.h>
1919+#include "action.h"
2020+#include "keyboard.h"
18211922uint16_t get_last_keycode(void); /**< Keycode of the last key. */
2023uint8_t get_last_mods(void); /**< Mods active with the last key. */
···1717#pragma once
18181919#include <stdint.h>
2020-2121-#include "quantum.h"
2020+#include "quantum_keycodes.h"
22212322typedef union {
2423 uint8_t raw;
+24-2
quantum/via.c
···2222# error "DYNAMIC_KEYMAP_ENABLE is not enabled"
2323#endif
24242525-#include "quantum.h"
2626-2725#include "via.h"
28262927#include "raw_hid.h"
3028#include "dynamic_keymap.h"
3129#include "eeprom.h"
3030+#include "eeconfig.h"
3131+#include "matrix.h"
3232+#include "timer.h"
3333+#include "wait.h"
3234#include "version.h" // for QMK_BUILDDATE used in EEPROM magic
33353636+#if defined(AUDIO_ENABLE)
3737+# include "audio.h"
3838+#endif
3939+4040+#if defined(BACKLIGHT_ENABLE)
4141+# include "backlight.h"
4242+#endif
4343+4444+#if defined(RGBLIGHT_ENABLE)
4545+# include "rgblight.h"
4646+#endif
4747+3448#if (defined(RGB_MATRIX_ENABLE) || defined(LED_MATRIX_ENABLE))
3549# include <lib/lib8tion/lib8tion.h>
5050+#endif
5151+5252+#if defined(RGB_MATRIX_ENABLE)
5353+# include "rgb_matrix.h"
5454+#endif
5555+5656+#if defined(LED_MATRIX_ENABLE)
5757+# include "led_matrix.h"
3658#endif
37593860// Can be called in an overriding via_init_kb() to test if keyboard level code usage of
+1
quantum/via.h
···1717#pragma once
18181919#include "eeconfig.h" // for EECONFIG_SIZE
2020+#include "action.h"
20212122// Keyboard level code can change where VIA stores the magic.
2223// The magic is the build date YYMMDD encoded as BCD in 3 bytes,
···2424# include "led.h"
2525# include "rgb_matrix.h"
2626# include "eeprom.h"
2727+# include "host.h"
2728# include <string.h>
2829# include <math.h>
2930