~ruther/qmk_firmware

6a4ee574bcc8b67a5b842411eec45d351b14d1ed — Keith Miyake 10 years ago 5bb7ef0
use preprocessor conditional on backlight initialization
2 files changed, 2 insertions(+), 1 deletions(-)

M keyboard/planck/Makefile
M keyboard/planck/matrix.c
M keyboard/planck/Makefile => keyboard/planck/Makefile +0 -1
@@ 126,7 126,6 @@ COMMAND_ENABLE = yes    # Commands for debug and configuration
# NKRO_ENABLE = yes		# USB Nkey Rollover - not yet supported in LUFA
BACKLIGHT_ENABLE = yes  # Enable keyboard backlight functionality
MIDI_ENABLE = YES 		# MIDI controls
BACKLIGHT_ENABLE = yes

ifdef MIDI_ENABLE
	SRC += keymap_midi.c

M keyboard/planck/matrix.c => keyboard/planck/matrix.c +2 -0
@@ 65,7 65,9 @@ void matrix_init(void)
    MCUCR |= (1<<JTD);
    MCUCR |= (1<<JTD);

    #if BACKLIGHT_ENABLE == 'yes'
    backlight_init_ports();
    #endif

    // Turn status LED on
    DDRE |= (1<<6);