diff options
author | QMK Bot <hello@qmk.fm> | 2021-01-11 08:07:48 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2021-01-11 08:07:48 +0000 |
commit | 6f9db2b48e35e13930700152738579eb5f94a839 (patch) | |
tree | 901743c846c60d4d5b565e0796157c9dbdfe58b8 /tmk_core/common/avr | |
parent | 4fdde323466a80d8abc204e093038a00047d0097 (diff) | |
parent | 4d96b85b6f39e89bdcc74853958f91153f27bfc1 (diff) | |
download | qmk_firmware-6f9db2b48e35e13930700152738579eb5f94a839.tar.gz qmk_firmware-6f9db2b48e35e13930700152738579eb5f94a839.zip |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'tmk_core/common/avr')
-rw-r--r-- | tmk_core/common/avr/suspend.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index aa0d42680..86c3df040 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c | |||
@@ -24,9 +24,6 @@ | |||
24 | 24 | ||
25 | #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) | 25 | #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) |
26 | # include "rgblight.h" | 26 | # include "rgblight.h" |
27 | extern rgblight_config_t rgblight_config; | ||
28 | static bool rgblight_enabled; | ||
29 | static bool is_suspended; | ||
30 | #endif | 27 | #endif |
31 | 28 | ||
32 | /** \brief Suspend idle | 29 | /** \brief Suspend idle |
@@ -104,12 +101,7 @@ static void power_down(uint8_t wdto) { | |||
104 | // stop_all_notes(); | 101 | // stop_all_notes(); |
105 | # endif /* AUDIO_ENABLE */ | 102 | # endif /* AUDIO_ENABLE */ |
106 | # if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) | 103 | # if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) |
107 | rgblight_timer_disable(); | 104 | rgblight_suspend(); |
108 | if (!is_suspended) { | ||
109 | is_suspended = true; | ||
110 | rgblight_enabled = rgblight_config.enable; | ||
111 | rgblight_disable_noeeprom(); | ||
112 | } | ||
113 | # endif | 105 | # endif |
114 | suspend_power_down_kb(); | 106 | suspend_power_down_kb(); |
115 | 107 | ||
@@ -177,11 +169,7 @@ void suspend_wakeup_init(void) { | |||
177 | #endif | 169 | #endif |
178 | led_set(host_keyboard_leds()); | 170 | led_set(host_keyboard_leds()); |
179 | #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) | 171 | #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) |
180 | is_suspended = false; | 172 | rgblight_wakeup(); |
181 | if (rgblight_enabled) { | ||
182 | rgblight_enable_noeeprom(); | ||
183 | } | ||
184 | rgblight_timer_enable(); | ||
185 | #endif | 173 | #endif |
186 | suspend_wakeup_init_kb(); | 174 | suspend_wakeup_init_kb(); |
187 | } | 175 | } |