X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Feeconfig.c;h=5bd47dc6ad242c9fec46e09e8f568dca6ae8134d;hb=caf7b4e68a597dec1ab23b98838ca0509c318962;hp=a833f4db9c32b73a17851a0138275c2d31a24f51;hpb=9de9d719527c7a8cac71d0bc49ba1d2d4f63cf06;p=max%2Ftmk_keyboard.git diff --git a/common/eeconfig.c b/common/eeconfig.c index a833f4db..5bd47dc6 100644 --- a/common/eeconfig.c +++ b/common/eeconfig.c @@ -10,6 +10,9 @@ void eeconfig_init(void) eeprom_write_byte(EECONFIG_DEFAULT_LAYER, 0); eeprom_write_byte(EECONFIG_KEYMAP, 0); eeprom_write_byte(EECONFIG_MOUSEKEY_ACCEL, 0); +#ifdef BACKLIGHT_ENABLE + eeprom_write_byte(EECONFIG_BACKLIGHT, 0); +#endif } void eeconfig_enable(void) @@ -35,3 +38,8 @@ void eeconfig_write_default_layer(uint8_t val) { eeprom_write_byte(EECONFIG_DEFA uint8_t eeconfig_read_keymap(void) { return eeprom_read_byte(EECONFIG_KEYMAP); } void eeconfig_write_keymap(uint8_t val) { eeprom_write_byte(EECONFIG_KEYMAP, val); } + +#ifdef BACKLIGHT_ENABLE +uint8_t eeconfig_read_backlight(void) { return eeprom_read_byte(EECONFIG_BACKLIGHT); } +void eeconfig_write_backlight(uint8_t val) { eeprom_write_byte(EECONFIG_BACKLIGHT, val); } +#endif