From c485d1cf2652bfb47afbb68f128a64f1bc518aa3 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 27 Mar 2023 20:08:17 +0100 Subject: [PATCH] Remove use of keymap.h (#20004) --- quantum/action.c | 2 +- quantum/action_layer.c | 2 +- quantum/keyboard.c | 2 +- quantum/keymap.h | 22 +--------------------- quantum/keymap_common.c | 3 ++- quantum/keymap_common.h | 1 + quantum/process_keycode/process_combo.c | 1 + quantum/quantum.h | 7 ++++++- 8 files changed, 14 insertions(+), 26 deletions(-) diff --git a/quantum/action.c b/quantum/action.c index 7d3f40a95083ebbbc11fc6a518e8b1ad3e48e3bf..a60173737694f896b80f45f1ac4ed656a9c0f277 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -19,7 +19,6 @@ along with this program. If not, see . #include "host.h" #include "keycode.h" #include "keyboard.h" -#include "keymap.h" #include "mousekey.h" #include "programmable_button.h" #include "command.h" @@ -30,6 +29,7 @@ along with this program. If not, see . #include "action.h" #include "wait.h" #include "keycode_config.h" +#include "debug.h" #ifdef BACKLIGHT_ENABLE # include "backlight.h" diff --git a/quantum/action_layer.c b/quantum/action_layer.c index 789a7fddeb0b2ea2594acea3f9792362ed53c221..7c09a5bd1e546c4de080690398bf361e1b4181fc 100644 --- a/quantum/action_layer.c +++ b/quantum/action_layer.c @@ -2,8 +2,8 @@ #include #include "keyboard.h" -#include "keymap.h" #include "action.h" +#include "encoder.h" #include "util.h" #include "action_layer.h" diff --git a/quantum/keyboard.c b/quantum/keyboard.c index 6e7d40ddc7457b492f3f5c69e2e7c47307b366f5..3f030d88451841878c9f4ad629749959696dd3b9 100644 --- a/quantum/keyboard.c +++ b/quantum/keyboard.c @@ -19,7 +19,7 @@ along with this program. If not, see . #include "quantum.h" #include "keyboard.h" #include "matrix.h" -#include "keymap.h" +#include "keymap_introspection.h" #include "magic.h" #include "host.h" #include "led.h" diff --git a/quantum/keymap.h b/quantum/keymap.h index 1263ef188bb3d39520b6363a23d6786c07d71ac0..a067e1aa368f0343fcb329e2f69f92d88d99cd5f 100644 --- a/quantum/keymap.h +++ b/quantum/keymap.h @@ -17,24 +17,4 @@ along with this program. If not, see . #pragma once -#include -#include -#include "platform_deps.h" -#include "action.h" -#include "keycode.h" -#include "report.h" -#include "host.h" -#include "debug.h" -#include "keycode_config.h" -#include "gpio.h" // for pin_t - -#include "quantum_keycodes.h" - -#include "keymap_common.h" - -#ifdef ENCODER_MAP_ENABLE -// Ensure we have a forward declaration for the encoder map -# include "encoder.h" -#endif - -#include "keymap_introspection.h" +#pragma message("'keymap.h' should no longer be included!") diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 6fcebc3242f9e99cad07664d9af2643e2fb8784c..0492e6fd1c3fc3aca2cd7534ddfc6b71aa60bbe0 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -15,7 +15,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "keymap.h" +#include "keymap_common.h" +#include "keymap_introspection.h" #include "report.h" #include "keycode.h" #include "action_layer.h" diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h index 20e70263f3492ba2422c883eb566b01d3f6d3542..fca4fc9ba3340a4bd216c802a25e9dbbe548e267 100644 --- a/quantum/keymap_common.h +++ b/quantum/keymap_common.h @@ -4,6 +4,7 @@ #pragma once #include +#include "keyboard.h" // translates key to keycode uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key); diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index 8597649c9296949a7a9954dc93dd0583b35180b2..ce6725c402f24c7adef372a46036b13f584141d3 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -14,6 +14,7 @@ * along with this program. If not, see . */ +#include "keymap_common.h" #include "print.h" #include "process_combo.h" #include "action_tapping.h" diff --git a/quantum/quantum.h b/quantum/quantum.h index 315fa25568826b7347620ec1ac8fa7cf74fd7a4c..38186a48a35eab72e731028a5aeff6396d546dbb 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -18,7 +18,7 @@ #include "platform_deps.h" #include "wait.h" #include "matrix.h" -#include "keymap.h" +#include "keyboard.h" #ifdef BACKLIGHT_ENABLE # include "backlight.h" @@ -36,6 +36,9 @@ # include "rgb_matrix.h" #endif +#include "keymap_common.h" +#include "quantum_keycodes.h" +#include "keycode_config.h" #include "action_layer.h" #include "eeconfig.h" #include "bootloader.h" @@ -44,10 +47,12 @@ #include "sync_timer.h" #include "gpio.h" #include "atomic_util.h" +#include "host.h" #include "led.h" #include "action_util.h" #include "action_tapping.h" #include "print.h" +#include "debug.h" #include "suspend.h" #include #include