Browse Source

Add BACKLIGHT_ENABLE conditional

led_matrix
tmk 11 years ago
parent
commit
25ad212c4a
3 changed files with 8 additions and 0 deletions
  1. 2
    0
      common/command.c
  2. 4
    0
      common/eeconfig.c
  3. 2
    0
      common/eeconfig.h

+ 2
- 0
common/command.c View File

print(".swap_grave_esc: "); print_dec(kc.swap_grave_esc); print("\n"); print(".swap_grave_esc: "); print_dec(kc.swap_grave_esc); print("\n");
print(".swap_backslash_backspace: "); print_dec(kc.swap_backslash_backspace); print("\n"); print(".swap_backslash_backspace: "); print_dec(kc.swap_backslash_backspace); print("\n");


#ifdef BACKLIGHT_ENABLE
backlight_config_t bc; backlight_config_t bc;
bc.raw = eeconfig_read_backlight(); bc.raw = eeconfig_read_backlight();
print("backlight_config.raw: "); print_hex8(bc.raw); print("\n"); print("backlight_config.raw: "); print_hex8(bc.raw); print("\n");
print(".enable: "); print_dec(bc.enable); print("\n"); print(".enable: "); print_dec(bc.enable); print("\n");
print(".level: "); print_dec(bc.level); print("\n"); print(".level: "); print_dec(bc.level); print("\n");
#endif
} }
#endif #endif



+ 4
- 0
common/eeconfig.c View File

eeprom_write_byte(EECONFIG_DEFAULT_LAYER, 0); eeprom_write_byte(EECONFIG_DEFAULT_LAYER, 0);
eeprom_write_byte(EECONFIG_KEYMAP, 0); eeprom_write_byte(EECONFIG_KEYMAP, 0);
eeprom_write_byte(EECONFIG_MOUSEKEY_ACCEL, 0); eeprom_write_byte(EECONFIG_MOUSEKEY_ACCEL, 0);
#ifdef BACKLIGHT_ENABLE
eeprom_write_byte(EECONFIG_BACKLIGHT, 0); eeprom_write_byte(EECONFIG_BACKLIGHT, 0);
#endif
} }


void eeconfig_enable(void) void eeconfig_enable(void)
uint8_t eeconfig_read_keymap(void) { return eeprom_read_byte(EECONFIG_KEYMAP); } 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); } 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); } 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); } void eeconfig_write_backlight(uint8_t val) { eeprom_write_byte(EECONFIG_BACKLIGHT, val); }
#endif

+ 2
- 0
common/eeconfig.h View File

uint8_t eeconfig_read_keymap(void); uint8_t eeconfig_read_keymap(void);
void eeconfig_write_keymap(uint8_t val); void eeconfig_write_keymap(uint8_t val);


#ifdef BACKLIGHT_ENABLE
uint8_t eeconfig_read_backlight(void); uint8_t eeconfig_read_backlight(void);
void eeconfig_write_backlight(uint8_t val); void eeconfig_write_backlight(uint8_t val);
#endif


#endif #endif