]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Move declaration of keymap_config.
authorflabbergast <s3+flabbergast@sdfeu.org>
Mon, 12 Oct 2015 08:46:48 +0000 (09:46 +0100)
committerflabbergast <s3+flabbergast@sdfeu.org>
Mon, 12 Oct 2015 08:46:48 +0000 (09:46 +0100)
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).

tmk_core/common/bootmagic.c
tmk_core/common/keymap.c
tmk_core/common/keymap.h

index 698693cbd97577f183e6f08e0d8813516ae08305..08241f7de3d360ea7a0904ff305b7045d69fffe1 100644 (file)
@@ -10,6 +10,7 @@
 #include "eeconfig.h"
 #include "bootmagic.h"
 
+keymap_config_t keymap_config;
 
 void bootmagic(void)
 {
index d227add851e7870bdc02819415d6b1b1c0be6518..876f5c82760f025b18756b516a969d001fc77fa6 100644 (file)
@@ -24,6 +24,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #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);
 
index e1a6f992e64cf47e0201790ddce1b8f069c6c06a..659ea357dbac73c3ffb688e6568169cf77b306d8 100644 (file)
@@ -38,7 +38,6 @@ typedef union {
         bool nkro:1;
     };
 } keymap_config_t;
-keymap_config_t keymap_config;
 #endif