From 1eb8523e9506c752fb726208d8853a82f06e6659 Mon Sep 17 00:00:00 2001 From: Wraul Date: Thu, 30 May 2013 20:24:39 +0200 Subject: Add support for backlight --- common/eeconfig.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common/eeconfig.c') diff --git a/common/eeconfig.c b/common/eeconfig.c index a833f4db9c..7af29ec10a 100644 --- a/common/eeconfig.c +++ b/common/eeconfig.c @@ -10,6 +10,7 @@ void eeconfig_init(void) eeprom_write_byte(EECONFIG_DEFAULT_LAYER, 0); eeprom_write_byte(EECONFIG_KEYMAP, 0); eeprom_write_byte(EECONFIG_MOUSEKEY_ACCEL, 0); + eeprom_write_byte(EECONFIG_BACKLIGHT, 0); } void eeconfig_enable(void) @@ -35,3 +36,6 @@ 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); } + +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); } -- cgit v1.2.3 From 25ad212c4adae5a27dd2d5a4e9d6bcdfc17edb1b Mon Sep 17 00:00:00 2001 From: tmk Date: Sun, 23 Jun 2013 08:14:40 +0900 Subject: Add BACKLIGHT_ENABLE conditional --- common/eeconfig.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common/eeconfig.c') diff --git a/common/eeconfig.c b/common/eeconfig.c index 7af29ec10a..5bd47dc6ad 100644 --- a/common/eeconfig.c +++ b/common/eeconfig.c @@ -10,7 +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) @@ -37,5 +39,7 @@ 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 -- cgit v1.2.3