diff --git a/keyboard/gh60/Makefile b/keyboard/gh60/Makefile index d8374676..5bdd7e46 100644 --- a/keyboard/gh60/Makefile +++ b/keyboard/gh60/Makefile @@ -138,7 +138,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality KEYMAP_EX_ENABLE = yes # External keymap in eeprom KEYMAP_SECTION_ENABLE = yes # Fixed address keymap for keymap editor -LED_MATRIX_ENABLE = yes +#LED_MATRIX_ENABLE = yes # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax diff --git a/keyboard/gh60/backlight.c b/keyboard/gh60/backlight.c index 91b38c11..bc524f6d 100644 --- a/keyboard/gh60/backlight.c +++ b/keyboard/gh60/backlight.c @@ -51,13 +51,14 @@ void backlight_set(uint8_t level) OCR1B = 0; } } -#elif #defined(GH60_REV_CNY) +#elif defined(GH60_REV_CNY) static const uint8_t backlight_table[] PROGMEM = { 0, 16, 128, 255 }; void backlight_set(uint8_t level) { +#ifdef LED_MATRIX_ENABLE if (level > 0) { led_matrix_disable(); for (uint8_t row = 0; row < LED_MATRIX_ROWS; row++) { @@ -70,6 +71,7 @@ void backlight_set(uint8_t level) else { led_matrix_disable(); } +#endif } #else static const uint8_t backlight_table[] PROGMEM = {