diff options
| author | IBNobody <ibnobody@gmail.com> | 2016-04-16 19:31:32 -0500 |
|---|---|---|
| committer | IBNobody <ibnobody@gmail.com> | 2016-04-16 19:31:32 -0500 |
| commit | 4aea806aa8aa585930a89b67d7206050ac6adb3a (patch) | |
| tree | ad8b36cc2ebb7500a531ff4601a6fbdf1086ffe2 /tmk_core/common/magic.c | |
| parent | b5c22ab5b5b77d5e21cc4145831608eed6756ad7 (diff) | |
| parent | b8d2e66638409066661e7dd3c66473d583256ec5 (diff) | |
| download | qmk_firmware-4aea806aa8aa585930a89b67d7206050ac6adb3a.tar.gz qmk_firmware-4aea806aa8aa585930a89b67d7206050ac6adb3a.zip | |
Adding Musical Notes
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 000000000..f21d1346c --- /dev/null +++ b/tmk_core/common/magic.c | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | #include <stdint.h> | ||
| 2 | #include <stdbool.h> | ||
| 3 | #include <util/delay.h> | ||
| 4 | #include "matrix.h" | ||
| 5 | #include "bootloader.h" | ||
| 6 | #include "debug.h" | ||
| 7 | #include "keymap.h" | ||
| 8 | #include "host.h" | ||
| 9 | #include "action_layer.h" | ||
| 10 | #include "eeconfig.h" | ||
| 11 | #include "magic.h" | ||
| 12 | |||
| 13 | keymap_config_t keymap_config; | ||
| 14 | |||
| 15 | void magic(void) | ||
| 16 | { | ||
| 17 | /* check signature */ | ||
| 18 | if (!eeconfig_is_enabled()) { | ||
| 19 | eeconfig_init(); | ||
| 20 | } | ||
| 21 | |||
| 22 | /* debug enable */ | ||
| 23 | debug_config.raw = eeconfig_read_debug(); | ||
| 24 | |||
| 25 | /* keymap config */ | ||
| 26 | keymap_config.raw = eeconfig_read_keymap(); | ||
| 27 | |||
| 28 | #ifdef NKRO_ENABLE | ||
| 29 | keyboard_nkro = keymap_config.nkro; | ||
| 30 | #endif | ||
| 31 | |||
| 32 | uint8_t default_layer = 0; | ||
| 33 | default_layer = eeconfig_read_default_layer(); | ||
| 34 | default_layer_set((uint32_t)default_layer); | ||
| 35 | |||
| 36 | } \ No newline at end of file | ||
