]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Add BACKLIGHT_ENABLE conditional
authortmk <nobody@nowhere>
Sat, 22 Jun 2013 23:14:40 +0000 (08:14 +0900)
committertmk <nobody@nowhere>
Sun, 23 Jun 2013 00:14:58 +0000 (09:14 +0900)
common/command.c
common/eeconfig.c
common/eeconfig.h

index bcf1b4937fc15585ea5b81770e32659909df335b..4649e00ab020900c195be0c1206792ac53d4f5e2 100644 (file)
@@ -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
 
index 7af29ec10a373969a47868a39697b577b4abc573..5bd47dc6ad242c9fec46e09e8f568dca6ae8134d 100644 (file)
@@ -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
index f0acce01c924dfd29197d7a34616411f5057edf4..e1b5ae282f032ebcc9554ae17f67d61e32b8c70e 100644 (file)
@@ -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