From: flabbergast Date: Mon, 12 Oct 2015 08:46:48 +0000 (+0100) Subject: Move declaration of keymap_config. X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=cb663eeca6f5f2924974b4c6798a64489a5cdacc;p=max%2Ftmk_keyboard.git Move declaration of keymap_config. Should really not declare variables in .h files - since it's included in different .c files, a proper linker then complains that the same variable is declared more than once (once for each .c file that the offending .h is included in). --- diff --git a/tmk_core/common/bootmagic.c b/tmk_core/common/bootmagic.c index 698693cb..08241f7d 100644 --- a/tmk_core/common/bootmagic.c +++ b/tmk_core/common/bootmagic.c @@ -10,6 +10,7 @@ #include "eeconfig.h" #include "bootmagic.h" +keymap_config_t keymap_config; void bootmagic(void) { diff --git a/tmk_core/common/keymap.c b/tmk_core/common/keymap.c index d227add8..876f5c82 100644 --- a/tmk_core/common/keymap.c +++ b/tmk_core/common/keymap.c @@ -24,6 +24,9 @@ along with this program. If not, see . #include "debug.h" #include "bootloader.h" +#ifdef BOOTMAGIC_ENABLE +extern keymap_config_t keymap_config; +#endif static action_t keycode_to_action(uint8_t keycode); diff --git a/tmk_core/common/keymap.h b/tmk_core/common/keymap.h index e1a6f992..659ea357 100644 --- a/tmk_core/common/keymap.h +++ b/tmk_core/common/keymap.h @@ -38,7 +38,6 @@ typedef union { bool nkro:1; }; } keymap_config_t; -keymap_config_t keymap_config; #endif