]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - keyboards/wilba_tech/wt_main.c
Usbasploader bootloader option addition (#6304)
[qmk_firmware.git] / keyboards / wilba_tech / wt_main.c
index de6d7b92c176e7fbf61da89145a0f5c3bf61d165..f8056839a7b2a3adcafb74838cc579622c3eac88 100644 (file)
@@ -15,7 +15,9 @@
  */
 
 #include "quantum.h"
+#ifdef WT_MONO_BACKLIGHT
 #include "keyboards/wilba_tech/wt_mono_backlight.h"
+#endif
 #include "keyboards/zeal60/zeal60_api.h" // Temporary hack
 #include "keyboards/zeal60/zeal60_keycodes.h" // Temporary hack
 
@@ -194,11 +196,13 @@ void main_init(void)
                eeprom_set_valid(true);
        }
 
+#ifdef WT_MONO_BACKLIGHT
        // Initialize LED drivers for backlight.
        backlight_init_drivers();
 
        backlight_timer_init();
        backlight_timer_enable();
+#endif
 }
 
 void bootmagic_lite(void)
@@ -209,8 +213,8 @@ void bootmagic_lite(void)
 
        // We need multiple scans because debouncing can't be turned off.
        matrix_scan();
-       wait_ms(DEBOUNCING_DELAY);
-       wait_ms(DEBOUNCING_DELAY);
+       wait_ms(DEBOUNCE);
+       wait_ms(DEBOUNCE);
        matrix_scan();
 
        // If the Esc (matrix 0,0) is held down on power up,
@@ -230,8 +234,10 @@ void matrix_init_kb(void)
 
 void matrix_scan_kb(void)
 {
+#ifdef WT_MONO_BACKLIGHT
        // This only updates the LED driver buffers if something has changed.
        backlight_update_pwm_buffers();
+#endif
        matrix_scan_user();
 }