diff --git a/docs/config_options.md b/docs/config_options.md index 3a4d7c87c52b..a3262b418b0f 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -29,7 +29,9 @@ This level contains all of the options for that particular keymap. If you wish t This is a C header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere. The `config.h` file shouldn't be including other `config.h` files, or anything besides this: - #include "config_common.h" +```c +#include "config_common.h" +``` ## Hardware Options diff --git a/docs/de/newbs_testing_debugging.md b/docs/de/newbs_testing_debugging.md index acc067e10f96..b390727775b8 100644 --- a/docs/de/newbs_testing_debugging.md +++ b/docs/de/newbs_testing_debugging.md @@ -41,7 +41,9 @@ Bevorzugst Du es lieber auf der Befehlszeile zu debuggen? Dafür eignet sich das Manchmal ist es hilfreich Debug-Nachrichten innerhalb deines eigenen [Custom Codes](de/custom_quantum_functions.md) zu drucken. Das ist ziemlich einfach. Beginne damit `print.h` am Anfang deiner Datei zu inkludieren: - #include +```c +#include "print.h" +``` Danach stehen dir verschiedene Druck-Funktionen zur Verfügung: diff --git a/docs/es/newbs_testing_debugging.md b/docs/es/newbs_testing_debugging.md index ef7412f15c3e..cb65b174fe80 100644 --- a/docs/es/newbs_testing_debugging.md +++ b/docs/es/newbs_testing_debugging.md @@ -41,7 +41,9 @@ Para plataformas compatibles, [QMK Toolbox](https://github.com/qmk/qmk_toolbox) A veces, es útil imprimir mensajes de depuración desde tu [código personalizado](custom_quantum_functions.md). Hacerlo es bastante simple. Comienza incluyendo `print.h` al principio de tu fichero: - #include +```c +#include "print.h" +``` Después de eso puedes utilzar algunas funciones print diferentes: diff --git a/docs/feature_macros.md b/docs/feature_macros.md index acd40d1bf349..3752b324969b 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -182,7 +182,9 @@ Which would send Left Control+`a` (Left Control down, `a`, Left Control up) - no By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap: - #include +```c +#include "sendstring_colemak.h" +``` ### Strings in Memory diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 77a6c8d7621a..8b001e3ce21b 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md @@ -184,7 +184,7 @@ If you wanted to consolidate macros and other functions into your userspace for First, you'd want to go through all of your `keymap.c` files and replace `process_record_user` with `process_record_keymap` instead. This way, you can still use keyboard specific codes on those boards, and use your custom "global" keycodes as well. You'll also want to replace `SAFE_RANGE` with `NEW_SAFE_RANGE` so that you wont have any overlapping keycodes -Then add `#include ` to all of your keymap.c files. This allows you to use these new keycodes without having to redefine them in each keymap. +Then add `#include ".h"` to all of your keymap.c files. This allows you to use these new keycodes without having to redefine them in each keymap. Once you've done that, you'll want to set the keycode definitions that you need to the `.h` file. For instance: ```c diff --git a/docs/fr-fr/newbs_testing_debugging.md b/docs/fr-fr/newbs_testing_debugging.md index 680d7644ed21..0307429ec23c 100644 --- a/docs/fr-fr/newbs_testing_debugging.md +++ b/docs/fr-fr/newbs_testing_debugging.md @@ -42,7 +42,9 @@ Vous préférez une solution basée sur le terminal? [hid_listen](https://www.pj Parfois, il est utile d'afficher des messages de débugage depuis votre [code custom](custom_quantum_functions.md). Le faire est assez simple. Commencez par ajouter `print.h` au début de votre fichier: - #include +```c +#include "print.h" +``` Une fois fait, vous pouvez utiliser les fonctions print suivantes: diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index 67e973030df6..170beadef41f 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -34,7 +34,9 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 これは最初に include されるものの 1 つである C ヘッダファイルで、プロジェクト全体(もし含まれる場合)にわたって持続します。多くの変数をここで設定し、他の場所からアクセスすることができます。`config.h` ファイルでは、以下のもの以外の、他の `config.h` ファイルやその他のファイルの include をしないでください: - #include "config_common.h" +```c +#include "config_common.h" +``` ## ハードウェアオプション diff --git a/docs/ja/feature_macros.md b/docs/ja/feature_macros.md index 5fbe36726ad3..14a58ad24420 100644 --- a/docs/ja/feature_macros.md +++ b/docs/ja/feature_macros.md @@ -187,7 +187,9 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) { デフォルトでは、QWERTY レイアウトの US キーマップを想定しています; それを変更したい場合(例えば OS がソフトウェア Colemak を使う場合)、キーマップのどこかに以下を含めます: - #include +```c +#include "sendstring_colemak.h" +``` ### メモリ内の文字列 diff --git a/docs/ja/feature_userspace.md b/docs/ja/feature_userspace.md index d0d46f63f87e..b0c113d1cf2f 100644 --- a/docs/ja/feature_userspace.md +++ b/docs/ja/feature_userspace.md @@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { 最初に、全ての `keymap.c` ファイルを調べ、代わりに `process_record_user` を `process_record_keymap` に置き換えます。この方法では、これらのキーボードでキーボード固有のコードを使用でき、カスタムの "global" キーコードも使うことができます。また、`SAFE_RANGE` を `NEW_SAFE_RANGE` に置き換えて、キーコードが重複しないようにすることもできます。 -次に、全ての keymap.c ファイルに `#include ` を追加します。これにより、各キーマップでそれらを再定義することなく新しいキーコードを使うことができます。 +次に、全ての keymap.c ファイルに `#include ".h"` を追加します。これにより、各キーマップでそれらを再定義することなく新しいキーコードを使うことができます。 それが完了したら、必要なキーコードの定義を `.h` ファイルに設定します。例えば: ```c diff --git a/docs/ja/newbs_testing_debugging.md b/docs/ja/newbs_testing_debugging.md index b80e09fc7000..41103bae973a 100644 --- a/docs/ja/newbs_testing_debugging.md +++ b/docs/ja/newbs_testing_debugging.md @@ -45,7 +45,9 @@ void keyboard_post_init_user(void) { [custom code](ja/custom_quantum_functions.md)内からデバッグメッセージを出力すると便利な場合があります。それはとても簡単です。ファイルの先頭に`print.h`のインクルードを追加します: - #include +```c +#include "print.h" +``` そのあとは、いくつかの異なった print 関数を使用することが出来ます。 diff --git a/docs/newbs_testing_debugging.md b/docs/newbs_testing_debugging.md index 1812389020fa..834fed7163b7 100644 --- a/docs/newbs_testing_debugging.md +++ b/docs/newbs_testing_debugging.md @@ -36,7 +36,9 @@ Prefer a terminal based solution? [hid_listen](https://www.pjrc.com/teensy/hid_l Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file: - #include +```c +#include "print.h" +``` After that you can use a few different print functions: diff --git a/docs/zh-cn/newbs_testing_debugging.md b/docs/zh-cn/newbs_testing_debugging.md index 4edceee41a0c..38e6346c4ba5 100644 --- a/docs/zh-cn/newbs_testing_debugging.md +++ b/docs/zh-cn/newbs_testing_debugging.md @@ -34,7 +34,9 @@ void keyboard_post_init_user(void) { 有时用[custom code](custom_quantum_functions.md)发送自定义调试信息很有用. 这么做很简单. 首先在你文件头部包含`print.h`: - #include +```c +#include "print.h" +``` 之后,您可以使用一些不同的打印功能: diff --git a/drivers/chibios/analog.c b/drivers/chibios/analog.c index 6f6db64010ac..2b3872afbb02 100644 --- a/drivers/chibios/analog.c +++ b/drivers/chibios/analog.c @@ -16,7 +16,7 @@ #include "quantum.h" #include "analog.h" -#include "ch.h" +#include #include #if !HAL_USE_ADC diff --git a/drivers/chibios/i2c_master.h b/drivers/chibios/i2c_master.h index b3e234e16187..c68109acbd3f 100644 --- a/drivers/chibios/i2c_master.h +++ b/drivers/chibios/i2c_master.h @@ -24,7 +24,7 @@ */ #pragma once -#include "ch.h" +#include #include #ifdef I2C1_BANK diff --git a/drivers/chibios/serial.c b/drivers/chibios/serial.c index 26c68065321e..54f7e1321f0b 100644 --- a/drivers/chibios/serial.c +++ b/drivers/chibios/serial.c @@ -6,7 +6,7 @@ #include "serial.h" #include "wait.h" -#include "hal.h" +#include // TODO: resolve/remove build warnings #if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) && defined(PROTOCOL_CHIBIOS) && defined(WS2812_DRIVER_BITBANG) diff --git a/drivers/chibios/serial_usart.c b/drivers/chibios/serial_usart.c index 62b4913cbfbb..ded78410e1b6 100644 --- a/drivers/chibios/serial_usart.c +++ b/drivers/chibios/serial_usart.c @@ -2,8 +2,8 @@ #include "serial.h" #include "printf.h" -#include "ch.h" -#include "hal.h" +#include +#include #ifndef USART_CR1_M0 # define USART_CR1_M0 USART_CR1_M // some platforms (f1xx) dont have this so diff --git a/drivers/chibios/spi_master.h b/drivers/chibios/spi_master.h index 0c18587c9536..5953bef77f72 100644 --- a/drivers/chibios/spi_master.h +++ b/drivers/chibios/spi_master.h @@ -18,7 +18,7 @@ #include #include -#include +#include "quantum.h" #ifndef SPI_DRIVER # define SPI_DRIVER SPID2 diff --git a/drivers/chibios/ws2812.c b/drivers/chibios/ws2812.c index 504fb4f07488..59ed90374a6c 100644 --- a/drivers/chibios/ws2812.c +++ b/drivers/chibios/ws2812.c @@ -1,7 +1,7 @@ #include "quantum.h" #include "ws2812.h" -#include "ch.h" -#include "hal.h" +#include +#include /* Adapted from https://github.com/bigjosh/SimpleNeoPixelDemo/ */ diff --git a/drivers/chibios/ws2812_pwm.c b/drivers/chibios/ws2812_pwm.c index 14be0a9edcb3..7595e2fa2865 100644 --- a/drivers/chibios/ws2812_pwm.c +++ b/drivers/chibios/ws2812_pwm.c @@ -1,6 +1,6 @@ #include "ws2812.h" #include "quantum.h" -#include "hal.h" +#include /* Adapted from https://github.com/joewa/WS2812-LED-Driver_ChibiOS/ */ diff --git a/drivers/eeprom/eeprom_stm32_L0_L1.c b/drivers/eeprom/eeprom_stm32_L0_L1.c index b62e6ffd76c1..ed26cc714577 100644 --- a/drivers/eeprom/eeprom_stm32_L0_L1.c +++ b/drivers/eeprom/eeprom_stm32_L0_L1.c @@ -17,7 +17,7 @@ #include #include -#include "hal.h" +#include #include "eeprom_driver.h" #include "eeprom_stm32_L0_L1.h" diff --git a/drivers/haptic/solenoid.c b/drivers/haptic/solenoid.c index 2975ef893a9f..3e61d5a171ff 100644 --- a/drivers/haptic/solenoid.c +++ b/drivers/haptic/solenoid.c @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -#include +#include "timer.h" #include "solenoid.h" #include "haptic.h" diff --git a/drivers/qwiic/micro_oled.c b/drivers/qwiic/micro_oled.c index bed6b2507eba..f63cf2e643bd 100644 --- a/drivers/qwiic/micro_oled.c +++ b/drivers/qwiic/micro_oled.c @@ -28,7 +28,7 @@ * along with this program. If not, see . */ #include "micro_oled.h" -#include +#include "print.h" #include #include "util/font5x7.h" #include "util/font8x16.h" diff --git a/platforms/chibios/GENERIC_STM32_F042X6/board/board.c b/platforms/chibios/GENERIC_STM32_F042X6/board/board.c index 7d93b68f9c1d..3c6f54ef5e50 100644 --- a/platforms/chibios/GENERIC_STM32_F042X6/board/board.c +++ b/platforms/chibios/GENERIC_STM32_F042X6/board/board.c @@ -19,8 +19,8 @@ * generator plugin. Do not edit manually. */ -#include "hal.h" -#include "stm32_gpio.h" +#include +#include /*===========================================================================*/ /* Driver local definitions. */ diff --git a/platforms/chibios/IC_TEENSY_3_1/board/board.c b/platforms/chibios/IC_TEENSY_3_1/board/board.c index 63e3f64929da..36ae8051eee4 100644 --- a/platforms/chibios/IC_TEENSY_3_1/board/board.c +++ b/platforms/chibios/IC_TEENSY_3_1/board/board.c @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -#include "hal.h" +#include #if HAL_USE_PAL || defined(__DOXYGEN__) /** diff --git a/platforms/chibios/STM32_F103_STM32DUINO/board/board.c b/platforms/chibios/STM32_F103_STM32DUINO/board/board.c index 9135f613646f..8a34e81f2574 100644 --- a/platforms/chibios/STM32_F103_STM32DUINO/board/board.c +++ b/platforms/chibios/STM32_F103_STM32DUINO/board/board.c @@ -14,7 +14,7 @@ limitations under the License. */ -#include "hal.h" +#include // Value to place in RTC backup register 10 for persistent bootloader mode #define RTC_BOOTLOADER_FLAG 0x424C diff --git a/quantum/audio/audio_chibios.c b/quantum/audio/audio_chibios.c index fba7c5987364..1f147f2c928e 100644 --- a/quantum/audio/audio_chibios.c +++ b/quantum/audio/audio_chibios.c @@ -15,8 +15,8 @@ */ #include "audio.h" -#include "ch.h" -#include "hal.h" +#include +#include #include #include "print.h" diff --git a/quantum/audio/luts.h b/quantum/audio/luts.h index 117d74cd00f6..6fdd3b4635de 100644 --- a/quantum/audio/luts.h +++ b/quantum/audio/luts.h @@ -19,8 +19,8 @@ # include # include #else -# include "ch.h" -# include "hal.h" +# include +# include #endif #ifndef LUTS_H diff --git a/quantum/fauxclicky.c b/quantum/fauxclicky.c index a57e2ed0755f..53499c9c1ec5 100644 --- a/quantum/fauxclicky.c +++ b/quantum/fauxclicky.c @@ -15,10 +15,10 @@ along with this program. If not, see . #include #include -#include -#include +#include "timer.h" +#include "fauxclicky.h" #include -#include +#include "musical_notes.h" bool fauxclicky_enabled = true; uint16_t note_start = 0; diff --git a/quantum/fauxclicky.h b/quantum/fauxclicky.h index 5c056918a73a..bfaacf909696 100644 --- a/quantum/fauxclicky.h +++ b/quantum/fauxclicky.h @@ -18,7 +18,7 @@ along with this program. If not, see . #endif #include "musical_notes.h" -#include "stdbool.h" +#include __attribute__((weak)) float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_D4, 0.25); __attribute__((weak)) float fauxclicky_released_note[2] = MUSICAL_NOTE(_C4, 0.125); diff --git a/quantum/keymap.h b/quantum/keymap.h index de3bece11e2b..90a2398ba4a3 100644 --- a/quantum/keymap.h +++ b/quantum/keymap.h @@ -25,7 +25,7 @@ along with this program. If not, see . # include #elif defined PROTOCOL_CHIBIOS // We need to ensure that chibios is include before redefining reset -# include "ch.h" +# include #endif #include "keycode.h" #include "action_macro.h" diff --git a/quantum/process_keycode/process_key_lock.c b/quantum/process_keycode/process_key_lock.c index 602127a74b6c..4bd58f0c1eb2 100644 --- a/quantum/process_keycode/process_key_lock.c +++ b/quantum/process_keycode/process_key_lock.c @@ -14,8 +14,8 @@ * along with this program. If not, see . */ -#include "inttypes.h" -#include "stdint.h" +#include +#include #include "process_key_lock.h" #define BV_64(shift) (((uint64_t)1) << (shift)) diff --git a/quantum/quantum.h b/quantum/quantum.h index cb0af306ac93..3e09df4f8809 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -21,7 +21,7 @@ # include #endif #if defined(PROTOCOL_CHIBIOS) -# include "hal.h" +# include # include "chibios_config.h" #endif diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index f239bd582f0e..c756857ae3a5 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -23,7 +23,7 @@ #include #include -#include "lib/lib8tion/lib8tion.h" +#include #ifndef RGB_MATRIX_CENTER const point_t k_rgb_matrix_center = {112, 32}; diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 7f9e330d371e..e6f14487c161 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -24,7 +24,7 @@ # include "eeprom.h" #endif #ifdef STM32_EEPROM_ENABLE -# include "hal.h" +# include # include "eeprom_stm32.h" #endif #include "wait.h" @@ -34,7 +34,7 @@ #include "color.h" #include "debug.h" #include "led_tables.h" -#include "lib/lib8tion/lib8tion.h" +#include #ifdef VELOCIKEY_ENABLE # include "velocikey.h" #endif @@ -983,7 +983,7 @@ void rgblight_task(void) { # ifndef RGBLIGHT_BREATHE_TABLE_SIZE # define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256 or 128 or 64 # endif -# include +# include "rgblight_breathe_table.h" # endif __attribute__((weak)) const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; diff --git a/quantum/serial_link/system/serial_link.c b/quantum/serial_link/system/serial_link.c index c59c06894423..f77483ad8c4b 100644 --- a/quantum/serial_link/system/serial_link.c +++ b/quantum/serial_link/system/serial_link.c @@ -24,7 +24,7 @@ SOFTWARE. #include "report.h" #include "host_driver.h" #include "serial_link/system/serial_link.h" -#include "hal.h" +#include #include "serial_link/protocol/byte_stuffer.h" #include "serial_link/protocol/transport.h" #include "serial_link/protocol/frame_router.h" diff --git a/quantum/serial_link/system/serial_link.h b/quantum/serial_link/system/serial_link.h index f48fbe9ea75f..b6a473957515 100644 --- a/quantum/serial_link/system/serial_link.h +++ b/quantum/serial_link/system/serial_link.h @@ -36,7 +36,7 @@ host_driver_t* get_serial_link_driver(void); void serial_link_update(void); #if defined(PROTOCOL_CHIBIOS) -# include "ch.h" +# include static inline void serial_link_lock(void) { chSysLock(); } diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index e8e944d710a2..97d49961dc3e 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -12,7 +12,7 @@ #endif #ifdef PROTOCOL_VUSB -# include "usbdrv.h" +# include #endif #ifdef EE_HANDS diff --git a/quantum/split_common/transport.h b/quantum/split_common/transport.h index ccce57e444d5..f3e752bf9bff 100644 --- a/quantum/split_common/transport.h +++ b/quantum/split_common/transport.h @@ -1,6 +1,6 @@ #pragma once -#include +#include "common/matrix.h" void transport_master_init(void); void transport_slave_init(void); diff --git a/quantum/via.h b/quantum/via.h index 373843f901a6..d0510fcabd3b 100644 --- a/quantum/via.h +++ b/quantum/via.h @@ -16,7 +16,7 @@ #pragma once -#include // for EECONFIG_SIZE +#include "tmk_core/common/eeconfig.h" // for EECONFIG_SIZE // Keyboard level code can change where VIA stores the magic. // The magic is the build date YYMMDD encoded as BCD in 3 bytes, diff --git a/quantum/visualizer/lcd_backlight.h b/quantum/visualizer/lcd_backlight.h index 7b0b6a9fd536..0a1535edf529 100644 --- a/quantum/visualizer/lcd_backlight.h +++ b/quantum/visualizer/lcd_backlight.h @@ -24,7 +24,7 @@ SOFTWARE. #ifndef LCD_BACKLIGHT_H_ #define LCD_BACKLIGHT_H_ -#include "stdint.h" +#include // Helper macros for storing hue, staturation and intensity as unsigned integers #define LCD_COLOR(hue, saturation, intensity) (hue << 16 | saturation << 8 | intensity) diff --git a/quantum/visualizer/led_backlight_keyframes.c b/quantum/visualizer/led_backlight_keyframes.c index d81117d2be3f..338ada52271a 100644 --- a/quantum/visualizer/led_backlight_keyframes.c +++ b/quantum/visualizer/led_backlight_keyframes.c @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "gfx.h" -#include "math.h" +#include #include "led_backlight_keyframes.h" static uint8_t fade_led_color(keyframe_animation_t* animation, int from, int to) { diff --git a/quantum/visualizer/visualizer.c b/quantum/visualizer/visualizer.c index 9e9cb6d41057..709affbb777a 100644 --- a/quantum/visualizer/visualizer.c +++ b/quantum/visualizer/visualizer.c @@ -26,7 +26,7 @@ SOFTWARE. #include "visualizer.h" #include #ifdef PROTOCOL_CHIBIOS -# include "ch.h" +# include #endif #include "gfx.h" diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 77da0139f22f..a7432bae599a 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -48,7 +48,7 @@ int retro_tapping_counter = 0; #endif #ifdef FAUXCLICKY_ENABLE -# include +# include "fauxclicky.h" #endif #ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c index f6d016ec9d13..6cabcc4b81b5 100644 --- a/tmk_core/common/chibios/bootloader.c +++ b/tmk_core/common/chibios/bootloader.c @@ -1,7 +1,7 @@ #include "bootloader.h" -#include "ch.h" -#include "hal.h" +#include +#include #include "wait.h" /* This code should be checked whether it runs correctly on platforms */ diff --git a/tmk_core/common/chibios/eeprom_stm32.h b/tmk_core/common/chibios/eeprom_stm32.h index ea0ce06400a4..373325cd2fa1 100644 --- a/tmk_core/common/chibios/eeprom_stm32.h +++ b/tmk_core/common/chibios/eeprom_stm32.h @@ -24,8 +24,8 @@ #ifndef __EEPROM_H #define __EEPROM_H -#include "ch.h" -#include "hal.h" +#include +#include #include "flash_stm32.h" // HACK ALERT. This definition may not match your processor diff --git a/tmk_core/common/chibios/eeprom_teensy.c b/tmk_core/common/chibios/eeprom_teensy.c index d436d0cb9548..e135e19a21df 100644 --- a/tmk_core/common/chibios/eeprom_teensy.c +++ b/tmk_core/common/chibios/eeprom_teensy.c @@ -1,5 +1,5 @@ -#include "ch.h" -#include "hal.h" +#include +#include #include "eeconfig.h" diff --git a/tmk_core/common/chibios/flash_stm32.h b/tmk_core/common/chibios/flash_stm32.h index 33ab7867daea..8a874f606549 100644 --- a/tmk_core/common/chibios/flash_stm32.h +++ b/tmk_core/common/chibios/flash_stm32.h @@ -23,8 +23,8 @@ extern "C" { #endif -#include "ch.h" -#include "hal.h" +#include +#include typedef enum { FLASH_BUSY = 1, FLASH_ERROR_PG, FLASH_ERROR_WRP, FLASH_ERROR_OPT, FLASH_COMPLETE, FLASH_TIMEOUT, FLASH_BAD_ADDRESS } FLASH_Status; diff --git a/tmk_core/common/chibios/sleep_led.c b/tmk_core/common/chibios/sleep_led.c index df1a1b5fcd16..18c6d6e17008 100644 --- a/tmk_core/common/chibios/sleep_led.c +++ b/tmk_core/common/chibios/sleep_led.c @@ -1,5 +1,5 @@ -#include "ch.h" -#include "hal.h" +#include +#include #include "led.h" #include "sleep_led.h" diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c index 64dfc05abce2..24efb0ac4c44 100644 --- a/tmk_core/common/chibios/suspend.c +++ b/tmk_core/common/chibios/suspend.c @@ -1,7 +1,7 @@ /* TODO */ -#include "ch.h" -#include "hal.h" +#include +#include #include "matrix.h" #include "action.h" diff --git a/tmk_core/common/chibios/timer.c b/tmk_core/common/chibios/timer.c index ac5a5af63822..9f664e1f7983 100644 --- a/tmk_core/common/chibios/timer.c +++ b/tmk_core/common/chibios/timer.c @@ -1,4 +1,4 @@ -#include "ch.h" +#include #include "timer.h" diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index e15897552f11..5e3ebe6ee6fc 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -5,7 +5,7 @@ #include "action_layer.h" #ifdef STM32_EEPROM_ENABLE -# include "hal.h" +# include # include "eeprom_stm32.h" #endif diff --git a/tmk_core/common/wait.h b/tmk_core/common/wait.h index c82cd2d65a29..f5ef12ac0751 100644 --- a/tmk_core/common/wait.h +++ b/tmk_core/common/wait.h @@ -12,7 +12,7 @@ extern "C" { # define wait_ms(ms) _delay_ms(ms) # define wait_us(us) _delay_us(us) #elif defined PROTOCOL_CHIBIOS -# include "ch.h" +# include # define wait_ms(ms) \ do { \ if (ms != 0) { \ diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index 400c0b8f5308..b99a40f1e00a 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -15,8 +15,8 @@ * GPL v2 or later. */ -#include "ch.h" -#include "hal.h" +#include +#include #include "usb_main.h" diff --git a/tmk_core/protocol/chibios/usb_driver.c b/tmk_core/protocol/chibios/usb_driver.c index 22d3c91f5a38..cc0ce7600fc9 100644 --- a/tmk_core/protocol/chibios/usb_driver.c +++ b/tmk_core/protocol/chibios/usb_driver.c @@ -22,7 +22,7 @@ * @{ */ -#include "hal.h" +#include #include "usb_driver.h" #include diff --git a/tmk_core/protocol/chibios/usb_driver.h b/tmk_core/protocol/chibios/usb_driver.h index 77dff80669a0..6d71bcec4f43 100644 --- a/tmk_core/protocol/chibios/usb_driver.h +++ b/tmk_core/protocol/chibios/usb_driver.h @@ -25,7 +25,7 @@ #ifndef USB_DRIVER_H # define USB_DRIVER_H -# include "hal_usb_cdc.h" +# include /*===========================================================================*/ /* Driver constants. */ diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index bb4bf6a58079..096e6e676e61 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -25,8 +25,8 @@ * makes the assumption this is safe to avoid littering with preprocessor directives. */ -#include "ch.h" -#include "hal.h" +#include +#include #include "usb_main.h" diff --git a/tmk_core/protocol/chibios/usb_main.h b/tmk_core/protocol/chibios/usb_main.h index d8813f480134..1381d0765438 100644 --- a/tmk_core/protocol/chibios/usb_main.h +++ b/tmk_core/protocol/chibios/usb_main.h @@ -21,8 +21,8 @@ // TESTING // extern uint8_t blinkLed; -#include "ch.h" -#include "hal.h" +#include +#include /* ------------------------- * General USB driver header diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 878be7d3424b..8fd4be8af5ac 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -61,7 +61,7 @@ extern keymap_config_t keymap_config; #endif #ifdef AUDIO_ENABLE -# include +# include "audio.h" #endif #ifdef BLUETOOTH_ENABLE diff --git a/tmk_core/protocol/midi/bytequeue/interrupt_setting.c b/tmk_core/protocol/midi/bytequeue/interrupt_setting.c index 1be1fee97379..407cc65f4910 100644 --- a/tmk_core/protocol/midi/bytequeue/interrupt_setting.c +++ b/tmk_core/protocol/midi/bytequeue/interrupt_setting.c @@ -32,7 +32,7 @@ interrupt_setting_t store_and_clear_interrupt(void) { void restore_interrupt_setting(interrupt_setting_t setting) { SREG = setting; } #elif defined(__arm__) -# include "ch.h" +# include interrupt_setting_t store_and_clear_interrupt(void) { chSysLock(); diff --git a/tmk_core/protocol/usb_descriptor.h b/tmk_core/protocol/usb_descriptor.h index aa8863f43fb3..1b43cbf3b2c8 100644 --- a/tmk_core/protocol/usb_descriptor.h +++ b/tmk_core/protocol/usb_descriptor.h @@ -46,7 +46,7 @@ #include #ifdef PROTOCOL_CHIBIOS -# include "hal.h" +# include #endif /*