You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
719 B
C
36 lines
719 B
C
9 years ago
|
#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);
|
||
|
|
||
|
}
|