Enable storing LED brightness in EEPROM

This commit is contained in:
2020-11-17 23:33:39 +01:00
parent d01fbdd411
commit 26eac4ac69
6 changed files with 75 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
#include <avr/io.h>
#include "config.h"
#include "keyboard.h"
#include "debounce.h"
#include "rtc.h"
@@ -26,8 +27,9 @@ void inc_second(void)
void inc_brightness(void)
{
led_brightness <<= 1;
if(!led_brightness) led_brightness = 1;
ram_cfg.led_brightness <<= 1;
if(!ram_cfg.led_brightness) ram_cfg.led_brightness = 1;
dump_ram2eem();
}
void keyboard_init(void)