]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Make sure that both RGBLIGHT_ENABLE is defined, for RGBLIGHT_SLEEP
authorDrashna Jaelre <drashna@live.com>
Thu, 21 Jun 2018 02:07:29 +0000 (19:07 -0700)
committerJack Humbert <jack.humb@gmail.com>
Fri, 29 Jun 2018 02:08:26 +0000 (22:08 -0400)
tmk_core/common/avr/suspend.c

index dfa1af273c0b238aea6e7fe7933a248b6c67a2f4..3d4a48439be4291589dddb5b974a0b54f9518b45 100644 (file)
@@ -19,7 +19,7 @@
     #include "audio.h"
 #endif /* AUDIO_ENABLE */
 
-#ifdef RGBLIGHT_SLEEP
+#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
   #include "rgblight.h"
 #endif
 
@@ -112,7 +112,7 @@ static void power_down(uint8_t wdto)
         // This sometimes disables the start-up noise, so it's been disabled
                // stop_all_notes();
        #endif /* AUDIO_ENABLE */
-#ifdef RGBLIGHT_SLEEP
+#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
 #ifdef RGBLIGHT_ANIMATIONS
   rgblight_timer_disable();
 #endif
@@ -188,7 +188,7 @@ void suspend_wakeup_init(void)
     backlight_init();
 #endif
        led_set(host_keyboard_leds());
-#ifdef RGBLIGHT_SLEEP
+#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
   rgblight_enable_noeeprom();
 #ifdef RGBLIGHT_ANIMATIONS
   rgblight_timer_enable();