summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2020-06-02 16:32:02 -0700
committerDrashna Jael're <drashna@live.com>2020-08-08 20:57:18 -0700
commitc759836a16b6035a8c2ef94475d270f1683ae7dc (patch)
treef490b9933a233bce38febd38f2b906b672c255ff
parent1cf68dffd4861d19579c21c92e625f4e875e2146 (diff)
Move dip switch init to back of the init process (#9233)
-rw-r--r--quantum/quantum.c3
-rw-r--r--tmk_core/common/keyboard.c7
2 files changed, 7 insertions, 3 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index af275bb2da..19d4fab5b7 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -643,9 +643,6 @@ void matrix_init_quantum() {
#ifdef OUTPUT_AUTO_ENABLE
set_output(OUTPUT_AUTO);
#endif
-#ifdef DIP_SWITCH_ENABLE
- dip_switch_init();
-#endif
matrix_init_kb();
}
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index c030da8130..1d0307f2a3 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -86,6 +86,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef VIA_ENABLE
# include "via.h"
#endif
+#ifdef DIP_SWITCH_ENABLE
+# include "dip_switch.h"
+#endif
// Only enable this if console is enabled to print to
#if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE)
@@ -264,6 +267,10 @@ void keyboard_init(void) {
keymap_config.nkro = 1;
eeconfig_update_keymap(keymap_config.raw);
#endif
+#ifdef DIP_SWITCH_ENABLE
+ dip_switch_init();
+#endif
+
keyboard_post_init_kb(); /* Always keep this last */
}