6 /** \brief eeconfig initialization
10 void eeconfig_init(void)
12 eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER);
13 eeprom_update_byte(EECONFIG_DEBUG, 0);
14 eeprom_update_byte(EECONFIG_DEFAULT_LAYER, 0);
15 eeprom_update_byte(EECONFIG_KEYMAP, 0);
16 eeprom_update_byte(EECONFIG_MOUSEKEY_ACCEL, 0);
17 #ifdef BACKLIGHT_ENABLE
18 eeprom_update_byte(EECONFIG_BACKLIGHT, 0);
21 eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default
23 #ifdef RGBLIGHT_ENABLE
24 eeprom_update_dword(EECONFIG_RGBLIGHT, 0);
27 eeprom_update_byte(EECONFIG_STENOMODE, 0);
31 /** \brief eeconfig enable
35 void eeconfig_enable(void)
37 eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER);
40 /** \brief eeconfig disable
44 void eeconfig_disable(void)
46 eeprom_update_word(EECONFIG_MAGIC, 0xFFFF);
49 /** \brief eeconfig is enabled
53 bool eeconfig_is_enabled(void)
55 return (eeprom_read_word(EECONFIG_MAGIC) == EECONFIG_MAGIC_NUMBER);
58 /** \brief eeconfig read debug
62 uint8_t eeconfig_read_debug(void) { return eeprom_read_byte(EECONFIG_DEBUG); }
63 /** \brief eeconfig update debug
67 void eeconfig_update_debug(uint8_t val) { eeprom_update_byte(EECONFIG_DEBUG, val); }
69 /** \brief eeconfig read default layer
73 uint8_t eeconfig_read_default_layer(void) { return eeprom_read_byte(EECONFIG_DEFAULT_LAYER); }
74 /** \brief eeconfig update default layer
78 void eeconfig_update_default_layer(uint8_t val) { eeprom_update_byte(EECONFIG_DEFAULT_LAYER, val); }
80 /** \brief eeconfig read keymap
84 uint8_t eeconfig_read_keymap(void) { return eeprom_read_byte(EECONFIG_KEYMAP); }
85 /** \brief eeconfig update keymap
89 void eeconfig_update_keymap(uint8_t val) { eeprom_update_byte(EECONFIG_KEYMAP, val); }
91 #ifdef BACKLIGHT_ENABLE
92 /** \brief eeconfig read backlight
96 uint8_t eeconfig_read_backlight(void) { return eeprom_read_byte(EECONFIG_BACKLIGHT); }
97 /** \brief eeconfig update backlight
101 void eeconfig_update_backlight(uint8_t val) { eeprom_update_byte(EECONFIG_BACKLIGHT, val); }
105 /** \brief eeconfig read audio
109 uint8_t eeconfig_read_audio(void) { return eeprom_read_byte(EECONFIG_AUDIO); }
110 /** \brief eeconfig update audio
114 void eeconfig_update_audio(uint8_t val) { eeprom_update_byte(EECONFIG_AUDIO, val); }