diff options
author | tmk <nobody@nowhere> | 2013-06-23 08:14:40 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-06-23 09:14:58 +0900 |
commit | 25ad212c4adae5a27dd2d5a4e9d6bcdfc17edb1b (patch) | |
tree | 7ed39e24295fbf853625a12fe273ea3ab4c7b202 /common | |
parent | 82aec4672213171b706f62862044b68d255bc4e9 (diff) |
Add BACKLIGHT_ENABLE conditional
Diffstat (limited to 'common')
-rw-r--r-- | common/command.c | 2 | ||||
-rw-r--r-- | common/eeconfig.c | 4 | ||||
-rw-r--r-- | common/eeconfig.h | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/common/command.c b/common/command.c index bcf1b4937f..4649e00ab0 100644 --- a/common/command.c +++ b/common/command.c @@ -151,11 +151,13 @@ static void print_eeconfig(void) print(".swap_grave_esc: "); print_dec(kc.swap_grave_esc); print("\n"); print(".swap_backslash_backspace: "); print_dec(kc.swap_backslash_backspace); print("\n"); +#ifdef BACKLIGHT_ENABLE backlight_config_t bc; bc.raw = eeconfig_read_backlight(); print("backlight_config.raw: "); print_hex8(bc.raw); print("\n"); print(".enable: "); print_dec(bc.enable); print("\n"); print(".level: "); print_dec(bc.level); print("\n"); +#endif } #endif 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 diff --git a/common/eeconfig.h b/common/eeconfig.h index f0acce01c9..e1b5ae282f 100644 --- a/common/eeconfig.h +++ b/common/eeconfig.h @@ -66,7 +66,9 @@ void eeconfig_write_default_layer(uint8_t val); uint8_t eeconfig_read_keymap(void); void eeconfig_write_keymap(uint8_t val); +#ifdef BACKLIGHT_ENABLE uint8_t eeconfig_read_backlight(void); void eeconfig_write_backlight(uint8_t val); +#endif #endif |