diff options
author | Olivier <olivier@gid0.org> | 2016-04-17 19:54:06 +0200 |
---|---|---|
committer | Olivier <olivier@gid0.org> | 2016-04-17 19:54:06 +0200 |
commit | b03a9f7252781b7fee75a684ba77650dc195dca5 (patch) | |
tree | 43d6a80f4f4cf47c5f571397a0a17ec6e7ef0083 /tmk_core/common/magic.c | |
parent | 0715cf46ac369921fd39b1b62d8a95fc89d48244 (diff) | |
parent | a67d425f4d5278595e7ab785a0f246b83fb1a09f (diff) |
Merge https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'tmk_core/common/magic.c')
-rw-r--r-- | tmk_core/common/magic.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tmk_core/common/magic.c b/tmk_core/common/magic.c new file mode 100644 index 0000000000..f21d1346c7 --- /dev/null +++ b/tmk_core/common/magic.c @@ -0,0 +1,36 @@ +#include <stdint.h> +#include <stdbool.h> +#include <util/delay.h> +#include "matrix.h" +#include "bootloader.h" +#include "debug.h" +#include "keymap.h" +#include "host.h" +#include "action_layer.h" +#include "eeconfig.h" +#include "magic.h" + +keymap_config_t keymap_config; + +void magic(void) +{ + /* check signature */ + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + + /* debug enable */ + debug_config.raw = eeconfig_read_debug(); + + /* keymap config */ + keymap_config.raw = eeconfig_read_keymap(); + +#ifdef NKRO_ENABLE + keyboard_nkro = keymap_config.nkro; +#endif + + uint8_t default_layer = 0; + default_layer = eeconfig_read_default_layer(); + default_layer_set((uint32_t)default_layer); + +}
\ No newline at end of file |