From 2728603fe6d73e805a539d337fd01051c46ca806 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 19 Nov 2021 18:41:02 +0000 Subject: [PATCH] Move tmk_core/common/ (#13918) --- build_keyboard.mk | 7 ++++--- build_test.mk | 6 +++--- common_features.mk | 4 +++- docs/feature_layers.md | 2 +- docs/fr-fr/faq_keymap.md | 2 +- docs/internals_gpio_control.md | 2 +- docs/ja/faq_keymap.md | 2 +- docs/ja/feature_layers.md | 2 +- docs/ja/pr_checklist.md | 2 +- docs/pr_checklist.md | 2 +- docs/zh-cn/faq_keymap.md | 2 +- keyboards/ai03/orbit/split_util.c | 2 +- .../cannonkeys/satisfaction75/satisfaction75.c | 2 +- .../satisfaction75/satisfaction_encoder.c | 2 +- keyboards/mxss/mxss.c | 2 +- keyboards/mxss/mxss_frontled.c | 2 +- keyboards/wilba_tech/wt_main.c | 2 +- keyboards/wilba_tech/wt_mono_backlight.c | 2 +- keyboards/wilba_tech/wt_rgb_backlight.c | 2 +- paths.mk | 3 +++ .../common => platforms}/arm_atsam/_timer.h | 0 {tmk_core/common => platforms}/arm_atsam/_wait.h | 0 .../common => platforms}/arm_atsam/atomic_util.h | 0 .../common => platforms}/arm_atsam/bootloader.c | 0 .../common => platforms}/arm_atsam/eeprom.c | 0 {tmk_core/common => platforms}/arm_atsam/gpio.h | 0 .../common => platforms}/arm_atsam/pin_defs.h | 0 .../common => platforms}/arm_atsam/platform.c | 0 .../arm_atsam/platform.mk | 0 .../arm_atsam/platform_deps.h | 0 .../common => platforms}/arm_atsam/suspend.c | 0 {tmk_core/common => platforms}/arm_atsam/timer.c | 0 {tmk_core/common => platforms}/atomic_util.h | 0 {tmk_core/common => platforms}/avr/_print.h | 0 {tmk_core/common => platforms}/avr/_timer.h | 0 {tmk_core/common => platforms}/avr/_wait.h | 0 {tmk_core/common => platforms}/avr/atomic_util.h | 0 {tmk_core/common => platforms}/avr/bootloader.c | 0 .../common => platforms}/avr/bootloader_size.c | 0 {tmk_core/common => platforms}/avr/gpio.h | 0 {tmk_core/common => platforms}/avr/pin_defs.h | 0 {tmk_core/common => platforms}/avr/platform.c | 0 tmk_core/avr.mk => platforms/avr/platform.mk | 2 +- .../common => platforms}/avr/platform_deps.h | 0 {tmk_core/common => platforms}/avr/printf.c | 0 {tmk_core/common => platforms}/avr/printf.mk | 0 {tmk_core/common => platforms}/avr/sleep_led.c | 0 {tmk_core/common => platforms}/avr/suspend.c | 0 {tmk_core/common => platforms}/avr/timer.c | 0 {tmk_core/common => platforms}/avr/timer_avr.h | 0 {tmk_core/common => platforms}/avr/xprintf.S | 0 {tmk_core/common => platforms}/avr/xprintf.h | 0 {tmk_core/common => platforms}/bootloader.h | 0 {tmk_core/common => platforms}/chibios/_timer.h | 0 {tmk_core/common => platforms}/chibios/_wait.c | 0 {tmk_core/common => platforms}/chibios/_wait.h | 0 .../common => platforms}/chibios/atomic_util.h | 0 .../common => platforms}/chibios/bootloader.c | 0 .../chibios/chibios_config.h | 0 .../common => platforms}/chibios/eeprom_stm32.c | 0 .../common => platforms}/chibios/eeprom_stm32.h | 0 .../chibios/eeprom_stm32_defs.h | 0 .../common => platforms}/chibios/eeprom_teensy.c | 0 .../common => platforms}/chibios/flash_stm32.c | 0 .../common => platforms}/chibios/flash_stm32.h | 0 .../chibios/gd32v_compatibility.h | 0 {tmk_core/common => platforms}/chibios/gpio.h | 0 .../common => platforms}/chibios/pin_defs.h | 0 .../common => platforms}/chibios/platform.c | 0 .../chibios.mk => platforms/chibios/platform.mk | 0 .../common => platforms}/chibios/platform_deps.h | 0 .../common => platforms}/chibios/sleep_led.c | 0 {tmk_core/common => platforms}/chibios/suspend.c | 0 .../chibios/syscall-fallbacks.c | 0 {tmk_core/common => platforms}/chibios/timer.c | 0 {tmk_core/common => platforms}/chibios/wait.c | 0 platforms/common.mk | 12 ++++++++++++ {tmk_core/common => platforms}/eeprom.h | 0 {tmk_core/common => platforms}/gpio.h | 0 {tmk_core/common => platforms}/pin_defs.h | 0 {tmk_core/common => platforms}/progmem.h | 0 {tmk_core/common => platforms}/sleep_led.h | 0 {tmk_core/common => platforms}/suspend.h | 0 {tmk_core/common => platforms}/test/_wait.h | 0 {tmk_core/common => platforms}/test/bootloader.c | 0 {tmk_core/common => platforms}/test/eeprom.c | 0 .../test/eeprom_stm32_tests.cpp | 0 .../common => platforms}/test/flash_stm32_mock.c | 0 {tmk_core/common => platforms}/test/hal.h | 0 {tmk_core/common => platforms}/test/platform.c | 0 {tmk_core/common => platforms}/test/platform.h | 0 tmk_core/native.mk => platforms/test/platform.mk | 0 .../common => platforms}/test/platform_deps.h | 0 {tmk_core/common => platforms}/test/rules.mk | 8 ++++---- {tmk_core/common => platforms}/test/suspend.c | 0 {tmk_core/common => platforms}/test/testlist.mk | 0 {tmk_core/common => platforms}/test/timer.c | 0 {tmk_core/common => platforms}/timer.h | 0 {tmk_core/common => platforms}/wait.h | 0 quantum/debounce/tests/rules.mk | 2 +- quantum/dynamic_keymap.c | 2 +- quantum/sequencer/tests/rules.mk | 2 +- quantum/via.c | 2 +- testlist.mk | 6 +++--- tmk_core/common.mk | 16 ---------------- tmk_core/protocol.mk | 2 -- tmk_core/rules.mk | 2 +- 107 files changed, 54 insertions(+), 54 deletions(-) rename {tmk_core/common => platforms}/arm_atsam/_timer.h (100%) rename {tmk_core/common => platforms}/arm_atsam/_wait.h (100%) rename {tmk_core/common => platforms}/arm_atsam/atomic_util.h (100%) rename {tmk_core/common => platforms}/arm_atsam/bootloader.c (100%) rename {tmk_core/common => platforms}/arm_atsam/eeprom.c (100%) rename {tmk_core/common => platforms}/arm_atsam/gpio.h (100%) rename {tmk_core/common => platforms}/arm_atsam/pin_defs.h (100%) rename {tmk_core/common => platforms}/arm_atsam/platform.c (100%) rename tmk_core/arm_atsam.mk => platforms/arm_atsam/platform.mk (100%) rename {tmk_core/common => platforms}/arm_atsam/platform_deps.h (100%) rename {tmk_core/common => platforms}/arm_atsam/suspend.c (100%) rename {tmk_core/common => platforms}/arm_atsam/timer.c (100%) rename {tmk_core/common => platforms}/atomic_util.h (100%) rename {tmk_core/common => platforms}/avr/_print.h (100%) rename {tmk_core/common => platforms}/avr/_timer.h (100%) rename {tmk_core/common => platforms}/avr/_wait.h (100%) rename {tmk_core/common => platforms}/avr/atomic_util.h (100%) rename {tmk_core/common => platforms}/avr/bootloader.c (100%) rename {tmk_core/common => platforms}/avr/bootloader_size.c (100%) rename {tmk_core/common => platforms}/avr/gpio.h (100%) rename {tmk_core/common => platforms}/avr/pin_defs.h (100%) rename {tmk_core/common => platforms}/avr/platform.c (100%) rename tmk_core/avr.mk => platforms/avr/platform.mk (97%) rename {tmk_core/common => platforms}/avr/platform_deps.h (100%) rename {tmk_core/common => platforms}/avr/printf.c (100%) rename {tmk_core/common => platforms}/avr/printf.mk (100%) rename {tmk_core/common => platforms}/avr/sleep_led.c (100%) rename {tmk_core/common => platforms}/avr/suspend.c (100%) rename {tmk_core/common => platforms}/avr/timer.c (100%) rename {tmk_core/common => platforms}/avr/timer_avr.h (100%) rename {tmk_core/common => platforms}/avr/xprintf.S (100%) rename {tmk_core/common => platforms}/avr/xprintf.h (100%) rename {tmk_core/common => platforms}/bootloader.h (100%) rename {tmk_core/common => platforms}/chibios/_timer.h (100%) rename {tmk_core/common => platforms}/chibios/_wait.c (100%) rename {tmk_core/common => platforms}/chibios/_wait.h (100%) rename {tmk_core/common => platforms}/chibios/atomic_util.h (100%) rename {tmk_core/common => platforms}/chibios/bootloader.c (100%) rename {tmk_core/common => platforms}/chibios/chibios_config.h (100%) rename {tmk_core/common => platforms}/chibios/eeprom_stm32.c (100%) rename {tmk_core/common => platforms}/chibios/eeprom_stm32.h (100%) rename {tmk_core/common => platforms}/chibios/eeprom_stm32_defs.h (100%) rename {tmk_core/common => platforms}/chibios/eeprom_teensy.c (100%) rename {tmk_core/common => platforms}/chibios/flash_stm32.c (100%) rename {tmk_core/common => platforms}/chibios/flash_stm32.h (100%) rename {tmk_core/common => platforms}/chibios/gd32v_compatibility.h (100%) rename {tmk_core/common => platforms}/chibios/gpio.h (100%) rename {tmk_core/common => platforms}/chibios/pin_defs.h (100%) rename {tmk_core/common => platforms}/chibios/platform.c (100%) rename tmk_core/chibios.mk => platforms/chibios/platform.mk (100%) rename {tmk_core/common => platforms}/chibios/platform_deps.h (100%) rename {tmk_core/common => platforms}/chibios/sleep_led.c (100%) rename {tmk_core/common => platforms}/chibios/suspend.c (100%) rename {tmk_core/common => platforms}/chibios/syscall-fallbacks.c (100%) rename {tmk_core/common => platforms}/chibios/timer.c (100%) rename {tmk_core/common => platforms}/chibios/wait.c (100%) create mode 100644 platforms/common.mk rename {tmk_core/common => platforms}/eeprom.h (100%) rename {tmk_core/common => platforms}/gpio.h (100%) rename {tmk_core/common => platforms}/pin_defs.h (100%) rename {tmk_core/common => platforms}/progmem.h (100%) rename {tmk_core/common => platforms}/sleep_led.h (100%) rename {tmk_core/common => platforms}/suspend.h (100%) rename {tmk_core/common => platforms}/test/_wait.h (100%) rename {tmk_core/common => platforms}/test/bootloader.c (100%) rename {tmk_core/common => platforms}/test/eeprom.c (100%) rename {tmk_core/common => platforms}/test/eeprom_stm32_tests.cpp (100%) rename {tmk_core/common => platforms}/test/flash_stm32_mock.c (100%) rename {tmk_core/common => platforms}/test/hal.h (100%) rename {tmk_core/common => platforms}/test/platform.c (100%) rename {tmk_core/common => platforms}/test/platform.h (100%) rename tmk_core/native.mk => platforms/test/platform.mk (100%) rename {tmk_core/common => platforms}/test/platform_deps.h (100%) rename {tmk_core/common => platforms}/test/rules.mk (78%) rename {tmk_core/common => platforms}/test/suspend.c (100%) rename {tmk_core/common => platforms}/test/testlist.mk (100%) rename {tmk_core/common => platforms}/test/timer.c (100%) rename {tmk_core/common => platforms}/timer.h (100%) rename {tmk_core/common => platforms}/wait.h (100%) delete mode 100644 tmk_core/common.mk diff --git a/build_keyboard.mk b/build_keyboard.mk index 36c628c7ce..c12aa0fce0 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -388,7 +388,7 @@ VPATH += $(COMMON_VPATH) include common_features.mk include $(BUILDDEFS_PATH)/generic_features.mk include $(TMK_PATH)/protocol.mk -include $(TMK_PATH)/common.mk +include $(PLATFORM_PATH)/common.mk include $(BUILDDEFS_PATH)/bootloader.mk SRC += $(patsubst %.c,%.clib,$(LIB_SRC)) @@ -404,13 +404,14 @@ ifneq ($(REQUIRE_PLATFORM_KEY),) endif endif -include $(TMK_PATH)/$(PLATFORM_KEY).mk +include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk +-include $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash.mk + ifneq ($(strip $(PROTOCOL)),) include $(TMK_PATH)/protocol/$(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]')).mk else include $(TMK_PATH)/protocol/$(PLATFORM_KEY).mk endif --include $(TOP_DIR)/platforms/$(PLATFORM_KEY)/flash.mk # TODO: remove this bodge? PROJECT_DEFS := $(OPT_DEFS) diff --git a/build_test.mk b/build_test.mk index 6e4494d77f..3553125a04 100644 --- a/build_test.mk +++ b/build_test.mk @@ -54,11 +54,11 @@ endif include common_features.mk include $(BUILDDEFS_PATH)/generic_features.mk -include $(TMK_PATH)/common.mk +include $(PLATFORM_PATH)/common.mk include $(TMK_PATH)/protocol.mk include $(QUANTUM_PATH)/debounce/tests/rules.mk include $(QUANTUM_PATH)/sequencer/tests/rules.mk -include $(TMK_PATH)/common/test/rules.mk +include $(PLATFORM_PATH)/test/rules.mk ifneq ($(filter $(FULL_TESTS),$(TEST)),) include build_full_test.mk endif @@ -73,7 +73,7 @@ $(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC) $(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS) $(TEST_OBJ)/$(TEST)_CONFIG := $($(TEST)_CONFIG) -include $(TMK_PATH)/native.mk +include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk include $(TMK_PATH)/rules.mk diff --git a/common_features.mk b/common_features.mk index 896fbb0129..8c593024f0 100644 --- a/common_features.mk +++ b/common_features.mk @@ -33,8 +33,10 @@ QUANTUM_SRC += \ VPATH += $(QUANTUM_DIR)/logging # Fall back to lib/printf if there is no platform provided print -ifeq ("$(wildcard $(TMK_PATH)/common/$(PLATFORM_KEY)/printf.mk)","") +ifeq ("$(wildcard $(PLATFORM_PATH)/$(PLATFORM_KEY)/printf.mk)","") include $(QUANTUM_PATH)/logging/print.mk +else + include $(PLATFORM_PATH)/$(PLATFORM_KEY)/printf.mk endif ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes) diff --git a/docs/feature_layers.md b/docs/feature_layers.md index 78d950dc49..e30c540a79 100644 --- a/docs/feature_layers.md +++ b/docs/feature_layers.md @@ -45,7 +45,7 @@ Once you have a good feel for how layers work and what you can do, you can get m Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem. -Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h). +Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/action_layer.h). ## Functions :id=functions diff --git a/docs/fr-fr/faq_keymap.md b/docs/fr-fr/faq_keymap.md index 374a005227..cc0700ab8e 100644 --- a/docs/fr-fr/faq_keymap.md +++ b/docs/fr-fr/faq_keymap.md @@ -6,7 +6,7 @@ Cette page couvre les questions souvent posées à propos des keymaps. Si vous n Regardez [Keycodes](keycodes.md) pour une liste des keycodes disponibles. Certains keycodes spécifiques ont des documentations plus complètes de disponible. -Les keycodes sont définies dans [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h). +Les keycodes sont définies dans [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/keycode.h). ## Quels sont les keycodes par défaut ? diff --git a/docs/internals_gpio_control.md b/docs/internals_gpio_control.md index 21a3bd661e..ccd3f8c74d 100644 --- a/docs/internals_gpio_control.md +++ b/docs/internals_gpio_control.md @@ -4,7 +4,7 @@ QMK has a GPIO control abstraction layer which is microcontroller agnostic. This ## Functions :id=functions -The following functions provide basic control of GPIOs and are found in `tmk_core/common//gpio.h`. +The following functions provide basic control of GPIOs and are found in `platforms//gpio.h`. |Function |Description | Old AVR Examples | Old ChibiOS/ARM Examples | |------------------------|--------------------------------------------------|-------------------------------------------------|-------------------------------------------------| diff --git a/docs/ja/faq_keymap.md b/docs/ja/faq_keymap.md index fb44e316b7..59c7d206a1 100644 --- a/docs/ja/faq_keymap.md +++ b/docs/ja/faq_keymap.md @@ -10,7 +10,7 @@ ## どのキーコードを使えますか? あなたが利用可能なキーコードのインデックスについては、[キーコード](ja/keycodes.md)を見てください。より広範なドキュメントがある場合は、そこからリンクしてあります。 -キーコードは実際には [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h) で定義されています。 +キーコードは実際には [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/keycode.h) で定義されています。 ## デフォルトのキーコードとは何か? diff --git a/docs/ja/feature_layers.md b/docs/ja/feature_layers.md index 011f0e0ef1..ca3e055835 100644 --- a/docs/ja/feature_layers.md +++ b/docs/ja/feature_layers.md @@ -50,7 +50,7 @@ QMK を使い始めたばかりの場合は、全てを単純にしたいでし レイヤーは番号順に上に積み重なっています。キーの押下の動作を決定する時に、QMK は上から順にレイヤーを走査し、`KC_TRNS` に設定されていない最初のアクティブなレイヤーに到達すると停止します。結果として、現在のレイヤーよりも数値的に低いレイヤーをアクティブにし、現在のレイヤー(あるいはアクティブでターゲットレイヤーよりも高い別のレイヤー)に `KC_TRNS` 以外のものがある場合、それが送信されるキーであり、アクティブ化したばかりのレイヤー上のキーではありません。これが、ほとんどの人の "なぜレイヤーが切り替わらないのか" 問題の原因です。 -場合によっては、マクロ内あるいはタップダンスルーチンの一部としてレイヤーを切り替えほうが良いかもしれません。`layer_on` はレイヤーをアクティブにし、`layer_off` はそれを非アクティブにします。もっと多くのレイヤーに関する関数は、[action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h) で見つけることができます。 +場合によっては、マクロ内あるいはタップダンスルーチンの一部としてレイヤーを切り替えほうが良いかもしれません。`layer_on` はレイヤーをアクティブにし、`layer_off` はそれを非アクティブにします。もっと多くのレイヤーに関する関数は、[action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/action_layer.h) で見つけることができます。 ## 関数 :id=functions diff --git a/docs/ja/pr_checklist.md b/docs/ja/pr_checklist.md index 18dbeccebb..caab2b4d50 100644 --- a/docs/ja/pr_checklist.md +++ b/docs/ja/pr_checklist.md @@ -27,7 +27,7 @@ - 「旧式の」 GPIO/I2C/SPI 関数を使用しない - 正当な理由がない限り、QMK の抽象化を使用しなければなりません (怠惰は正当な理由にはなりません) - タイミングの抽象化にも従う必要があります: - `_delay_ms()` のかわりに `wait_ms()` を。(`#include ` も消します) - - `timer_read()` と `timer_read32()` など。 -- タイミング API は [timer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/timer.h) を参照してください + - `timer_read()` と `timer_read32()` など。 -- タイミング API は [timer.h](https://github.com/qmk/qmk_firmware/blob/master/platforms/timer.h) を参照してください - 新しい抽象化が有用だと思う場合は、次のことをお勧めします: - 機能が完成するまで自分のキーボードでプロトタイプを作成する - Discord の QMK コラボレータと話し合う diff --git a/docs/pr_checklist.md b/docs/pr_checklist.md index 94c62c6535..2a2b0f1e76 100644 --- a/docs/pr_checklist.md +++ b/docs/pr_checklist.md @@ -24,7 +24,7 @@ If there are any inconsistencies with these recommendations, you're best off [cr - no "old-school" or other low-level GPIO/I2C/SPI functions may be used -- must use QMK abstractions unless justifiable (and laziness is not valid justification) - timing abstractions should be followed too: - `wait_ms()` instead of `_delay_ms()` (remove `#include ` too) - - `timer_read()` and `timer_read32()` etc. -- see [timer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/timer.h) for the timing APIs + - `timer_read()` and `timer_read32()` etc. -- see [timer.h](https://github.com/qmk/qmk_firmware/blob/master/platforms/timer.h) for the timing APIs - if you think a new abstraction is useful, you're encouraged to: - prototype it in your own keyboard until it's feature-complete - discuss it with QMK Collaborators on Discord diff --git a/docs/zh-cn/faq_keymap.md b/docs/zh-cn/faq_keymap.md index fdfa25ad9e..ff38f38894 100644 --- a/docs/zh-cn/faq_keymap.md +++ b/docs/zh-cn/faq_keymap.md @@ -5,7 +5,7 @@ ## 我能用什么键码? 看[键码](keycodes.md)你可以找到你能用的键码索引。可以的话这些链接可以连接到更广泛的文档。 -键码实际上定义在[common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h). +键码实际上定义在[common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/keycode.h). ## 默认的键码什么样? diff --git a/keyboards/ai03/orbit/split_util.c b/keyboards/ai03/orbit/split_util.c index a83ff5bc67..2352e5a111 100644 --- a/keyboards/ai03/orbit/split_util.c +++ b/keyboards/ai03/orbit/split_util.c @@ -8,7 +8,7 @@ #include "quantum.h" #ifdef EE_HANDS -# include "tmk_core/common/eeprom.h" +# include "eeprom.h" # include "eeconfig.h" #endif diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c index 8b5016437c..bd7eaf1885 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c @@ -9,7 +9,7 @@ #include "raw_hid.h" #include "dynamic_keymap.h" -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "version.h" // for QMK_BUILDDATE used in EEPROM magic /* Artificial delay added to get media keys to work in the encoder*/ diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c index cefdbc5f9c..0d2fdc359c 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c @@ -1,5 +1,5 @@ #include "satisfaction75.h" -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" void pre_encoder_mode_change(){ if(encoder_mode == ENC_MODE_CLOCK_SET){ diff --git a/keyboards/mxss/mxss.c b/keyboards/mxss/mxss.c index f591d39e67..21beee232c 100644 --- a/keyboards/mxss/mxss.c +++ b/keyboards/mxss/mxss.c @@ -17,7 +17,7 @@ */ #include QMK_KEYBOARD_H -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "action_layer.h" #include "rgblight.h" #include "via.h" diff --git a/keyboards/mxss/mxss_frontled.c b/keyboards/mxss/mxss_frontled.c index 3c4309f070..f5e4613dfb 100644 --- a/keyboards/mxss/mxss_frontled.c +++ b/keyboards/mxss/mxss_frontled.c @@ -17,7 +17,7 @@ */ #include "mxss_frontled.h" -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "rgblight.h" #include "via.h" #include "version.h" // for QMK_BUILDDATE used in EEPROM magic diff --git a/keyboards/wilba_tech/wt_main.c b/keyboards/wilba_tech/wt_main.c index d5e136e06b..a8ad795446 100644 --- a/keyboards/wilba_tech/wt_main.c +++ b/keyboards/wilba_tech/wt_main.c @@ -27,7 +27,7 @@ #include "via.h" #ifndef VIA_ENABLE -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "version.h" // for QMK_BUILDDATE used in EEPROM magic #endif diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c index 77cee34ca6..5e2fde810c 100644 --- a/keyboards/wilba_tech/wt_mono_backlight.c +++ b/keyboards/wilba_tech/wt_mono_backlight.c @@ -24,7 +24,7 @@ #include "progmem.h" #include "quantum/color.h" -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "via.h" // uses EEPROM address, lighting value IDs #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR) diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 82b1fb2fb3..63763c6c90 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -68,7 +68,7 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL]; #include "progmem.h" #include "quantum/color.h" -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "via.h" // uses EEPROM address, lighting value IDs #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR) diff --git a/paths.mk b/paths.mk index 7be1b2ce04..5a39d00ecd 100644 --- a/paths.mk +++ b/paths.mk @@ -13,6 +13,9 @@ DRIVER_PATH = $(DRIVER_DIR) PLATFORM_DIR = platforms PLATFORM_PATH = $(PLATFORM_DIR) +PROTOCOL_DIR = protocol +PROTOCOL_PATH = $(TMK_DIR)/$(PROTOCOL_DIR) + BUILDDEFS_DIR = builddefs BUILDDEFS_PATH = $(BUILDDEFS_DIR) diff --git a/tmk_core/common/arm_atsam/_timer.h b/platforms/arm_atsam/_timer.h similarity index 100% rename from tmk_core/common/arm_atsam/_timer.h rename to platforms/arm_atsam/_timer.h diff --git a/tmk_core/common/arm_atsam/_wait.h b/platforms/arm_atsam/_wait.h similarity index 100% rename from tmk_core/common/arm_atsam/_wait.h rename to platforms/arm_atsam/_wait.h diff --git a/tmk_core/common/arm_atsam/atomic_util.h b/platforms/arm_atsam/atomic_util.h similarity index 100% rename from tmk_core/common/arm_atsam/atomic_util.h rename to platforms/arm_atsam/atomic_util.h diff --git a/tmk_core/common/arm_atsam/bootloader.c b/platforms/arm_atsam/bootloader.c similarity index 100% rename from tmk_core/common/arm_atsam/bootloader.c rename to platforms/arm_atsam/bootloader.c diff --git a/tmk_core/common/arm_atsam/eeprom.c b/platforms/arm_atsam/eeprom.c similarity index 100% rename from tmk_core/common/arm_atsam/eeprom.c rename to platforms/arm_atsam/eeprom.c diff --git a/tmk_core/common/arm_atsam/gpio.h b/platforms/arm_atsam/gpio.h similarity index 100% rename from tmk_core/common/arm_atsam/gpio.h rename to platforms/arm_atsam/gpio.h diff --git a/tmk_core/common/arm_atsam/pin_defs.h b/platforms/arm_atsam/pin_defs.h similarity index 100% rename from tmk_core/common/arm_atsam/pin_defs.h rename to platforms/arm_atsam/pin_defs.h diff --git a/tmk_core/common/arm_atsam/platform.c b/platforms/arm_atsam/platform.c similarity index 100% rename from tmk_core/common/arm_atsam/platform.c rename to platforms/arm_atsam/platform.c diff --git a/tmk_core/arm_atsam.mk b/platforms/arm_atsam/platform.mk similarity index 100% rename from tmk_core/arm_atsam.mk rename to platforms/arm_atsam/platform.mk diff --git a/tmk_core/common/arm_atsam/platform_deps.h b/platforms/arm_atsam/platform_deps.h similarity index 100% rename from tmk_core/common/arm_atsam/platform_deps.h rename to platforms/arm_atsam/platform_deps.h diff --git a/tmk_core/common/arm_atsam/suspend.c b/platforms/arm_atsam/suspend.c similarity index 100% rename from tmk_core/common/arm_atsam/suspend.c rename to platforms/arm_atsam/suspend.c diff --git a/tmk_core/common/arm_atsam/timer.c b/platforms/arm_atsam/timer.c similarity index 100% rename from tmk_core/common/arm_atsam/timer.c rename to platforms/arm_atsam/timer.c diff --git a/tmk_core/common/atomic_util.h b/platforms/atomic_util.h similarity index 100% rename from tmk_core/common/atomic_util.h rename to platforms/atomic_util.h diff --git a/tmk_core/common/avr/_print.h b/platforms/avr/_print.h similarity index 100% rename from tmk_core/common/avr/_print.h rename to platforms/avr/_print.h diff --git a/tmk_core/common/avr/_timer.h b/platforms/avr/_timer.h similarity index 100% rename from tmk_core/common/avr/_timer.h rename to platforms/avr/_timer.h diff --git a/tmk_core/common/avr/_wait.h b/platforms/avr/_wait.h similarity index 100% rename from tmk_core/common/avr/_wait.h rename to platforms/avr/_wait.h diff --git a/tmk_core/common/avr/atomic_util.h b/platforms/avr/atomic_util.h similarity index 100% rename from tmk_core/common/avr/atomic_util.h rename to platforms/avr/atomic_util.h diff --git a/tmk_core/common/avr/bootloader.c b/platforms/avr/bootloader.c similarity index 100% rename from tmk_core/common/avr/bootloader.c rename to platforms/avr/bootloader.c diff --git a/tmk_core/common/avr/bootloader_size.c b/platforms/avr/bootloader_size.c similarity index 100% rename from tmk_core/common/avr/bootloader_size.c rename to platforms/avr/bootloader_size.c diff --git a/tmk_core/common/avr/gpio.h b/platforms/avr/gpio.h similarity index 100% rename from tmk_core/common/avr/gpio.h rename to platforms/avr/gpio.h diff --git a/tmk_core/common/avr/pin_defs.h b/platforms/avr/pin_defs.h similarity index 100% rename from tmk_core/common/avr/pin_defs.h rename to platforms/avr/pin_defs.h diff --git a/tmk_core/common/avr/platform.c b/platforms/avr/platform.c similarity index 100% rename from tmk_core/common/avr/platform.c rename to platforms/avr/platform.c diff --git a/tmk_core/avr.mk b/platforms/avr/platform.mk similarity index 97% rename from tmk_core/avr.mk rename to platforms/avr/platform.mk index c52262273e..b45108736f 100644 --- a/tmk_core/avr.mk +++ b/platforms/avr/platform.mk @@ -163,7 +163,7 @@ ifeq ($(strip $(QMK_BOOTLOADER_TYPE)),) else make -C lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/ clean $(QMK_BIN) generate-dfu-header --quiet --keyboard $(KEYBOARD) --output lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/Keyboard.h - $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) + $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) platforms/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) $(eval PROGRAM_SIZE_KB=$(shell n=`expr $(MAX_SIZE) / 1024` && echo $$(($$n)) || echo 0)) $(eval BOOT_SECTION_SIZE_KB=$(shell n=`expr $(BOOTLOADER_SIZE) / 1024` && echo $$(($$n)) || echo 0)) $(eval FLASH_SIZE_KB=$(shell n=`expr $(PROGRAM_SIZE_KB) + $(BOOT_SECTION_SIZE_KB)` && echo $$(($$n)) || echo 0)) diff --git a/tmk_core/common/avr/platform_deps.h b/platforms/avr/platform_deps.h similarity index 100% rename from tmk_core/common/avr/platform_deps.h rename to platforms/avr/platform_deps.h diff --git a/tmk_core/common/avr/printf.c b/platforms/avr/printf.c similarity index 100% rename from tmk_core/common/avr/printf.c rename to platforms/avr/printf.c diff --git a/tmk_core/common/avr/printf.mk b/platforms/avr/printf.mk similarity index 100% rename from tmk_core/common/avr/printf.mk rename to platforms/avr/printf.mk diff --git a/tmk_core/common/avr/sleep_led.c b/platforms/avr/sleep_led.c similarity index 100% rename from tmk_core/common/avr/sleep_led.c rename to platforms/avr/sleep_led.c diff --git a/tmk_core/common/avr/suspend.c b/platforms/avr/suspend.c similarity index 100% rename from tmk_core/common/avr/suspend.c rename to platforms/avr/suspend.c diff --git a/tmk_core/common/avr/timer.c b/platforms/avr/timer.c similarity index 100% rename from tmk_core/common/avr/timer.c rename to platforms/avr/timer.c diff --git a/tmk_core/common/avr/timer_avr.h b/platforms/avr/timer_avr.h similarity index 100% rename from tmk_core/common/avr/timer_avr.h rename to platforms/avr/timer_avr.h diff --git a/tmk_core/common/avr/xprintf.S b/platforms/avr/xprintf.S similarity index 100% rename from tmk_core/common/avr/xprintf.S rename to platforms/avr/xprintf.S diff --git a/tmk_core/common/avr/xprintf.h b/platforms/avr/xprintf.h similarity index 100% rename from tmk_core/common/avr/xprintf.h rename to platforms/avr/xprintf.h diff --git a/tmk_core/common/bootloader.h b/platforms/bootloader.h similarity index 100% rename from tmk_core/common/bootloader.h rename to platforms/bootloader.h diff --git a/tmk_core/common/chibios/_timer.h b/platforms/chibios/_timer.h similarity index 100% rename from tmk_core/common/chibios/_timer.h rename to platforms/chibios/_timer.h diff --git a/tmk_core/common/chibios/_wait.c b/platforms/chibios/_wait.c similarity index 100% rename from tmk_core/common/chibios/_wait.c rename to platforms/chibios/_wait.c diff --git a/tmk_core/common/chibios/_wait.h b/platforms/chibios/_wait.h similarity index 100% rename from tmk_core/common/chibios/_wait.h rename to platforms/chibios/_wait.h diff --git a/tmk_core/common/chibios/atomic_util.h b/platforms/chibios/atomic_util.h similarity index 100% rename from tmk_core/common/chibios/atomic_util.h rename to platforms/chibios/atomic_util.h diff --git a/tmk_core/common/chibios/bootloader.c b/platforms/chibios/bootloader.c similarity index 100% rename from tmk_core/common/chibios/bootloader.c rename to platforms/chibios/bootloader.c diff --git a/tmk_core/common/chibios/chibios_config.h b/platforms/chibios/chibios_config.h similarity index 100% rename from tmk_core/common/chibios/chibios_config.h rename to platforms/chibios/chibios_config.h diff --git a/tmk_core/common/chibios/eeprom_stm32.c b/platforms/chibios/eeprom_stm32.c similarity index 100% rename from tmk_core/common/chibios/eeprom_stm32.c rename to platforms/chibios/eeprom_stm32.c diff --git a/tmk_core/common/chibios/eeprom_stm32.h b/platforms/chibios/eeprom_stm32.h similarity index 100% rename from tmk_core/common/chibios/eeprom_stm32.h rename to platforms/chibios/eeprom_stm32.h diff --git a/tmk_core/common/chibios/eeprom_stm32_defs.h b/platforms/chibios/eeprom_stm32_defs.h similarity index 100% rename from tmk_core/common/chibios/eeprom_stm32_defs.h rename to platforms/chibios/eeprom_stm32_defs.h diff --git a/tmk_core/common/chibios/eeprom_teensy.c b/platforms/chibios/eeprom_teensy.c similarity index 100% rename from tmk_core/common/chibios/eeprom_teensy.c rename to platforms/chibios/eeprom_teensy.c diff --git a/tmk_core/common/chibios/flash_stm32.c b/platforms/chibios/flash_stm32.c similarity index 100% rename from tmk_core/common/chibios/flash_stm32.c rename to platforms/chibios/flash_stm32.c diff --git a/tmk_core/common/chibios/flash_stm32.h b/platforms/chibios/flash_stm32.h similarity index 100% rename from tmk_core/common/chibios/flash_stm32.h rename to platforms/chibios/flash_stm32.h diff --git a/tmk_core/common/chibios/gd32v_compatibility.h b/platforms/chibios/gd32v_compatibility.h similarity index 100% rename from tmk_core/common/chibios/gd32v_compatibility.h rename to platforms/chibios/gd32v_compatibility.h diff --git a/tmk_core/common/chibios/gpio.h b/platforms/chibios/gpio.h similarity index 100% rename from tmk_core/common/chibios/gpio.h rename to platforms/chibios/gpio.h diff --git a/tmk_core/common/chibios/pin_defs.h b/platforms/chibios/pin_defs.h similarity index 100% rename from tmk_core/common/chibios/pin_defs.h rename to platforms/chibios/pin_defs.h diff --git a/tmk_core/common/chibios/platform.c b/platforms/chibios/platform.c similarity index 100% rename from tmk_core/common/chibios/platform.c rename to platforms/chibios/platform.c diff --git a/tmk_core/chibios.mk b/platforms/chibios/platform.mk similarity index 100% rename from tmk_core/chibios.mk rename to platforms/chibios/platform.mk diff --git a/tmk_core/common/chibios/platform_deps.h b/platforms/chibios/platform_deps.h similarity index 100% rename from tmk_core/common/chibios/platform_deps.h rename to platforms/chibios/platform_deps.h diff --git a/tmk_core/common/chibios/sleep_led.c b/platforms/chibios/sleep_led.c similarity index 100% rename from tmk_core/common/chibios/sleep_led.c rename to platforms/chibios/sleep_led.c diff --git a/tmk_core/common/chibios/suspend.c b/platforms/chibios/suspend.c similarity index 100% rename from tmk_core/common/chibios/suspend.c rename to platforms/chibios/suspend.c diff --git a/tmk_core/common/chibios/syscall-fallbacks.c b/platforms/chibios/syscall-fallbacks.c similarity index 100% rename from tmk_core/common/chibios/syscall-fallbacks.c rename to platforms/chibios/syscall-fallbacks.c diff --git a/tmk_core/common/chibios/timer.c b/platforms/chibios/timer.c similarity index 100% rename from tmk_core/common/chibios/timer.c rename to platforms/chibios/timer.c diff --git a/tmk_core/common/chibios/wait.c b/platforms/chibios/wait.c similarity index 100% rename from tmk_core/common/chibios/wait.c rename to platforms/chibios/wait.c diff --git a/platforms/common.mk b/platforms/common.mk new file mode 100644 index 0000000000..f7a0fc7028 --- /dev/null +++ b/platforms/common.mk @@ -0,0 +1,12 @@ +PLATFORM_COMMON_DIR = $(PLATFORM_PATH)/$(PLATFORM_KEY) + +TMK_COMMON_SRC += \ + $(PLATFORM_COMMON_DIR)/platform.c \ + $(PLATFORM_COMMON_DIR)/suspend.c \ + $(PLATFORM_COMMON_DIR)/timer.c \ + $(PLATFORM_COMMON_DIR)/bootloader.c \ + +# Search Path +VPATH += $(PLATFORM_PATH) +VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY) +VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR) diff --git a/tmk_core/common/eeprom.h b/platforms/eeprom.h similarity index 100% rename from tmk_core/common/eeprom.h rename to platforms/eeprom.h diff --git a/tmk_core/common/gpio.h b/platforms/gpio.h similarity index 100% rename from tmk_core/common/gpio.h rename to platforms/gpio.h diff --git a/tmk_core/common/pin_defs.h b/platforms/pin_defs.h similarity index 100% rename from tmk_core/common/pin_defs.h rename to platforms/pin_defs.h diff --git a/tmk_core/common/progmem.h b/platforms/progmem.h similarity index 100% rename from tmk_core/common/progmem.h rename to platforms/progmem.h diff --git a/tmk_core/common/sleep_led.h b/platforms/sleep_led.h similarity index 100% rename from tmk_core/common/sleep_led.h rename to platforms/sleep_led.h diff --git a/tmk_core/common/suspend.h b/platforms/suspend.h similarity index 100% rename from tmk_core/common/suspend.h rename to platforms/suspend.h diff --git a/tmk_core/common/test/_wait.h b/platforms/test/_wait.h similarity index 100% rename from tmk_core/common/test/_wait.h rename to platforms/test/_wait.h diff --git a/tmk_core/common/test/bootloader.c b/platforms/test/bootloader.c similarity index 100% rename from tmk_core/common/test/bootloader.c rename to platforms/test/bootloader.c diff --git a/tmk_core/common/test/eeprom.c b/platforms/test/eeprom.c similarity index 100% rename from tmk_core/common/test/eeprom.c rename to platforms/test/eeprom.c diff --git a/tmk_core/common/test/eeprom_stm32_tests.cpp b/platforms/test/eeprom_stm32_tests.cpp similarity index 100% rename from tmk_core/common/test/eeprom_stm32_tests.cpp rename to platforms/test/eeprom_stm32_tests.cpp diff --git a/tmk_core/common/test/flash_stm32_mock.c b/platforms/test/flash_stm32_mock.c similarity index 100% rename from tmk_core/common/test/flash_stm32_mock.c rename to platforms/test/flash_stm32_mock.c diff --git a/tmk_core/common/test/hal.h b/platforms/test/hal.h similarity index 100% rename from tmk_core/common/test/hal.h rename to platforms/test/hal.h diff --git a/tmk_core/common/test/platform.c b/platforms/test/platform.c similarity index 100% rename from tmk_core/common/test/platform.c rename to platforms/test/platform.c diff --git a/tmk_core/common/test/platform.h b/platforms/test/platform.h similarity index 100% rename from tmk_core/common/test/platform.h rename to platforms/test/platform.h diff --git a/tmk_core/native.mk b/platforms/test/platform.mk similarity index 100% rename from tmk_core/native.mk rename to platforms/test/platform.mk diff --git a/tmk_core/common/test/platform_deps.h b/platforms/test/platform_deps.h similarity index 100% rename from tmk_core/common/test/platform_deps.h rename to platforms/test/platform_deps.h diff --git a/tmk_core/common/test/rules.mk b/platforms/test/rules.mk similarity index 78% rename from tmk_core/common/test/rules.mk rename to platforms/test/rules.mk index 73d2302da7..66b853d8ee 100644 --- a/tmk_core/common/test/rules.mk +++ b/platforms/test/rules.mk @@ -11,14 +11,14 @@ eeprom_stm32_large_DEFS := $(eeprom_stm32_DEFS) \ -DFEE_PAGE_COUNT=16 eeprom_stm32_INC := \ - $(TMK_PATH)/common/chibios/ + $(PLATFORM_PATH)/chibios/ eeprom_stm32_tiny_INC := $(eeprom_stm32_INC) eeprom_stm32_large_INC := $(eeprom_stm32_INC) eeprom_stm32_SRC := \ $(TOP_DIR)/drivers/eeprom/eeprom_driver.c \ - $(TMK_PATH)/common/test/eeprom_stm32_tests.cpp \ - $(TMK_PATH)/common/test/flash_stm32_mock.c \ - $(TMK_PATH)/common/chibios/eeprom_stm32.c + $(PLATFORM_PATH)/$(PLATFORM_KEY)/eeprom_stm32_tests.cpp \ + $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash_stm32_mock.c \ + $(PLATFORM_PATH)/chibios/eeprom_stm32.c eeprom_stm32_tiny_SRC := $(eeprom_stm32_SRC) eeprom_stm32_large_SRC := $(eeprom_stm32_SRC) diff --git a/tmk_core/common/test/suspend.c b/platforms/test/suspend.c similarity index 100% rename from tmk_core/common/test/suspend.c rename to platforms/test/suspend.c diff --git a/tmk_core/common/test/testlist.mk b/platforms/test/testlist.mk similarity index 100% rename from tmk_core/common/test/testlist.mk rename to platforms/test/testlist.mk diff --git a/tmk_core/common/test/timer.c b/platforms/test/timer.c similarity index 100% rename from tmk_core/common/test/timer.c rename to platforms/test/timer.c diff --git a/tmk_core/common/timer.h b/platforms/timer.h similarity index 100% rename from tmk_core/common/timer.h rename to platforms/timer.h diff --git a/tmk_core/common/wait.h b/platforms/wait.h similarity index 100% rename from tmk_core/common/wait.h rename to platforms/wait.h diff --git a/quantum/debounce/tests/rules.mk b/quantum/debounce/tests/rules.mk index 66928d7eb6..e908dd6f67 100644 --- a/quantum/debounce/tests/rules.mk +++ b/quantum/debounce/tests/rules.mk @@ -16,7 +16,7 @@ DEBOUNCE_COMMON_DEFS := -DMATRIX_ROWS=4 -DMATRIX_COLS=10 -DDEBOUNCE=5 DEBOUNCE_COMMON_SRC := $(QUANTUM_PATH)/debounce/tests/debounce_test_common.cpp \ - $(TMK_PATH)/common/test/timer.c + $(PLATFORM_PATH)/$(PLATFORM_KEY)/timer.c debounce_sym_defer_g_DEFS := $(DEBOUNCE_COMMON_DEFS) debounce_sym_defer_g_SRC := $(DEBOUNCE_COMMON_SRC) \ diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index b7a9f2662c..f5525576d8 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -16,7 +16,7 @@ #include "config.h" #include "keymap.h" // to get keymaps[][][] -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "progmem.h" // to read default from flash #include "quantum.h" // for send_string() #include "dynamic_keymap.h" diff --git a/quantum/sequencer/tests/rules.mk b/quantum/sequencer/tests/rules.mk index 87a204669c..a3bbd80513 100644 --- a/quantum/sequencer/tests/rules.mk +++ b/quantum/sequencer/tests/rules.mk @@ -8,4 +8,4 @@ sequencer_SRC := \ $(QUANTUM_PATH)/sequencer/tests/midi_mock.c \ $(QUANTUM_PATH)/sequencer/tests/sequencer_tests.cpp \ $(QUANTUM_PATH)/sequencer/sequencer.c \ - $(TMK_PATH)/common/test/timer.c + $(PLATFORM_PATH)/$(PLATFORM_KEY)/timer.c diff --git a/quantum/via.c b/quantum/via.c index 1b2dbcf08d..7c8aa753e7 100644 --- a/quantum/via.c +++ b/quantum/via.c @@ -44,7 +44,7 @@ #include "raw_hid.h" #include "dynamic_keymap.h" -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "version.h" // for QMK_BUILDDATE used in EEPROM magic #include "via_ensure_keycode.h" diff --git a/testlist.mk b/testlist.mk index 364fb339c6..faff4d201c 100644 --- a/testlist.mk +++ b/testlist.mk @@ -1,9 +1,9 @@ TEST_LIST = $(notdir $(patsubst %/rules.mk,%,$(wildcard $(ROOT_DIR)/tests/*/rules.mk))) FULL_TESTS := $(TEST_LIST) -include $(ROOT_DIR)/quantum/debounce/tests/testlist.mk -include $(ROOT_DIR)/quantum/sequencer/tests/testlist.mk -include $(ROOT_DIR)/tmk_core/common/test/testlist.mk +include $(QUANTUM_PATH)/debounce/tests/testlist.mk +include $(QUANTUM_PATH)/sequencer/tests/testlist.mk +include $(PLATFORM_PATH)/test/testlist.mk define VALIDATE_TEST_LIST ifneq ($1,) diff --git a/tmk_core/common.mk b/tmk_core/common.mk deleted file mode 100644 index 555b942c9d..0000000000 --- a/tmk_core/common.mk +++ /dev/null @@ -1,16 +0,0 @@ -COMMON_DIR = common -PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY) - -TMK_COMMON_SRC += \ - $(PLATFORM_COMMON_DIR)/platform.c \ - $(PLATFORM_COMMON_DIR)/suspend.c \ - $(PLATFORM_COMMON_DIR)/timer.c \ - $(PLATFORM_COMMON_DIR)/bootloader.c \ - -# Use platform provided print if it exists --include $(TMK_PATH)/$(PLATFORM_COMMON_DIR)/printf.mk - -# Search Path -VPATH += $(TMK_PATH)/$(COMMON_DIR) -VPATH += $(TMK_PATH)/$(PLATFORM_COMMON_DIR) -VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR) diff --git a/tmk_core/protocol.mk b/tmk_core/protocol.mk index a8723e6b2e..31a6de76f1 100644 --- a/tmk_core/protocol.mk +++ b/tmk_core/protocol.mk @@ -1,5 +1,3 @@ -PROTOCOL_DIR = protocol - TMK_COMMON_SRC += \ $(PROTOCOL_DIR)/host.c \ $(PROTOCOL_DIR)/report.c \ diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index e657af3f43..6767a8e4af 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -479,7 +479,7 @@ ifeq ($(findstring avr-gcc,$(CC)),avr-gcc) SIZE_MARGIN = 1024 check-size: - $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) + $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) platforms/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) $(eval CURRENT_SIZE=$(shell if [ -f $(BUILD_DIR)/$(TARGET).hex ]; then $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex | $(AWK) 'NR==2 {print $$4}'; else printf 0; fi)) $(eval FREE_SIZE=$(shell expr $(MAX_SIZE) - $(CURRENT_SIZE))) $(eval OVER_SIZE=$(shell expr $(CURRENT_SIZE) - $(MAX_SIZE)))