diff options
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/common/avr/suspend.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 1c7618ff5..213f03f6f 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c | |||
| @@ -19,6 +19,9 @@ | |||
| 19 | #include "audio.h" | 19 | #include "audio.h" |
| 20 | #endif /* AUDIO_ENABLE */ | 20 | #endif /* AUDIO_ENABLE */ |
| 21 | 21 | ||
| 22 | #ifdef RGBLIGHT_ANIMATIONS | ||
| 23 | #include "rgblight.h" | ||
| 24 | #endif | ||
| 22 | 25 | ||
| 23 | 26 | ||
| 24 | #define wdt_intr_enable(value) \ | 27 | #define wdt_intr_enable(value) \ |
| @@ -85,7 +88,12 @@ static void power_down(uint8_t wdto) | |||
| 85 | // This sometimes disables the start-up noise, so it's been disabled | 88 | // This sometimes disables the start-up noise, so it's been disabled |
| 86 | // stop_all_notes(); | 89 | // stop_all_notes(); |
| 87 | #endif /* AUDIO_ENABLE */ | 90 | #endif /* AUDIO_ENABLE */ |
| 88 | 91 | #ifdef RGBLIGHT_SLEEP | |
| 92 | #ifdef RGBLIGHT_ANIMATIONS | ||
| 93 | rgblight_timer_disable(); | ||
| 94 | #endif | ||
| 95 | rgblight_disable(); | ||
| 96 | #endif | ||
| 89 | // TODO: more power saving | 97 | // TODO: more power saving |
| 90 | // See PicoPower application note | 98 | // See PicoPower application note |
| 91 | // - I/O port input with pullup | 99 | // - I/O port input with pullup |
| @@ -132,6 +140,12 @@ void suspend_wakeup_init(void) | |||
| 132 | backlight_init(); | 140 | backlight_init(); |
| 133 | #endif | 141 | #endif |
| 134 | led_set(host_keyboard_leds()); | 142 | led_set(host_keyboard_leds()); |
| 143 | #ifdef RGBLIGHT_SLEEP | ||
| 144 | rgblight_enable(); | ||
| 145 | #ifdef RGBLIGHT_ANIMATIONS | ||
| 146 | rgblight_timer_enable(); | ||
| 147 | #endif | ||
| 148 | #endif | ||
| 135 | } | 149 | } |
| 136 | 150 | ||
| 137 | #ifndef NO_SUSPEND_POWER_DOWN | 151 | #ifndef NO_SUSPEND_POWER_DOWN |
