aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/common/avr
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-04-28 19:39:54 -0700
committerGitHub <noreply@github.com>2021-04-29 12:39:54 +1000
commitd8167779cdfb243cb140782210d2cc6a7cb9b123 (patch)
tree52a05a41568f5dbb0d3ba931c0d401ad03504410 /tmk_core/common/avr
parent7409f03cbf7a863e0c2c949de2a5a276f5661c04 (diff)
downloadqmk_firmware-d8167779cdfb243cb140782210d2cc6a7cb9b123.tar.gz
qmk_firmware-d8167779cdfb243cb140782210d2cc6a7cb9b123.zip
Change RGB/LED Matrix to use a simple define for USB suspend (#12697)
Diffstat (limited to 'tmk_core/common/avr')
-rw-r--r--tmk_core/common/avr/suspend.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c
index 96b19a77f..1c2bf9cb4 100644
--- a/tmk_core/common/avr/suspend.c
+++ b/tmk_core/common/avr/suspend.c
@@ -163,6 +163,10 @@ void suspend_power_down(void) {
163 rgblight_suspend(); 163 rgblight_suspend();
164# endif 164# endif
165 165
166# if defined(RGB_MATRIX_ENABLE)
167 rgb_matrix_set_suspend_state(true);
168# endif
169
166 // Enter sleep state if possible (ie, the MCU has a watchdog timeout interrupt) 170 // Enter sleep state if possible (ie, the MCU has a watchdog timeout interrupt)
167# if defined(WDT_vect) 171# if defined(WDT_vect)
168 power_down(WDTO_15MS); 172 power_down(WDTO_15MS);
@@ -214,6 +218,9 @@ void suspend_wakeup_init(void) {
214#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) 218#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
215 rgblight_wakeup(); 219 rgblight_wakeup();
216#endif 220#endif
221# if defined(RGB_MATRIX_ENABLE)
222 rgb_matrix_set_suspend_state(false);
223# endif
217 224
218 suspend_wakeup_init_kb(); 225 suspend_wakeup_init_kb();
219} 226}