From d8167779cdfb243cb140782210d2cc6a7cb9b123 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 28 Apr 2021 19:39:54 -0700 Subject: Change RGB/LED Matrix to use a simple define for USB suspend (#12697) --- tmk_core/common/avr/suspend.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tmk_core/common/avr') diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 96b19a77fd..1c2bf9cb46 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -163,6 +163,10 @@ void suspend_power_down(void) { rgblight_suspend(); # endif +# if defined(RGB_MATRIX_ENABLE) + rgb_matrix_set_suspend_state(true); +# endif + // Enter sleep state if possible (ie, the MCU has a watchdog timeout interrupt) # if defined(WDT_vect) power_down(WDTO_15MS); @@ -214,6 +218,9 @@ void suspend_wakeup_init(void) { #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) rgblight_wakeup(); #endif +# if defined(RGB_MATRIX_ENABLE) + rgb_matrix_set_suspend_state(false); +# endif suspend_wakeup_init_kb(); } -- cgit v1.2.3