diff options
author | Joel Challis <git@zvecr.com> | 2021-02-28 15:50:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-28 15:50:15 +0000 |
commit | a3cbc8a004f6ec5b0e1df326353a2a2fc8221129 (patch) | |
tree | a124699fd5e949703b24abea49df14c34b89f43a /tmk_core/common/magic.c | |
parent | 02dc3b672217a4bc28b68c944863efd34dc28108 (diff) |
Overhaul bootmagic logic to have single entrypoint (#8532)
* Relocate bootmagic logic to have single entrypoint
* Align init of layer state
Diffstat (limited to 'tmk_core/common/magic.c')
-rw-r--r-- | tmk_core/common/magic.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/tmk_core/common/magic.c b/tmk_core/common/magic.c deleted file mode 100644 index e14994164e..0000000000 --- a/tmk_core/common/magic.c +++ /dev/null @@ -1,39 +0,0 @@ -#include <stdint.h> -#include <stdbool.h> -#if defined(__AVR__) -# include <util/delay.h> -#endif -#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; - -/** \brief Magic - * - * FIXME: Needs doc - */ -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(); - - uint8_t default_layer = 0; - default_layer = eeconfig_read_default_layer(); - default_layer_set((layer_state_t)default_layer); - - /* Also initialize layer state to trigger callback functions for layer_state */ - layer_state_set_kb((layer_state_t)layer_state); -} |