浏览代码

use preprocessor conditional on backlight initialization

Keith Miyake 10 年之前
父节点
当前提交
6a4ee574bc
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 0 1
      keyboard/planck/Makefile
  2. 2 0
      keyboard/planck/matrix.c

+ 0 - 1
keyboard/planck/Makefile

@@ -126,7 +126,6 @@ COMMAND_ENABLE = yes    # Commands for debug and configuration
 # NKRO_ENABLE = yes		# USB Nkey Rollover - not yet supported in LUFA
 # NKRO_ENABLE = yes		# USB Nkey Rollover - not yet supported in LUFA
 BACKLIGHT_ENABLE = yes  # Enable keyboard backlight functionality
 BACKLIGHT_ENABLE = yes  # Enable keyboard backlight functionality
 MIDI_ENABLE = YES 		# MIDI controls
 MIDI_ENABLE = YES 		# MIDI controls
-BACKLIGHT_ENABLE = yes
 
 
 ifdef MIDI_ENABLE
 ifdef MIDI_ENABLE
 	SRC += keymap_midi.c
 	SRC += keymap_midi.c

+ 2 - 0
keyboard/planck/matrix.c

@@ -65,7 +65,9 @@ void matrix_init(void)
     MCUCR |= (1<<JTD);
     MCUCR |= (1<<JTD);
     MCUCR |= (1<<JTD);
     MCUCR |= (1<<JTD);
 
 
+    #if BACKLIGHT_ENABLE == 'yes'
     backlight_init_ports();
     backlight_init_ports();
+    #endif
 
 
     // Turn status LED on
     // Turn status LED on
     DDRE |= (1<<6);
     DDRE |= (1<<6);