From da0c551692b117e4f91ca3e446155027290e3c96 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 12 May 2021 18:24:44 -0700 Subject: Add missing LED Matrix suspend code to suspend.c (#12878) Co-authored-by: Ryan --- tmk_core/common/avr/suspend.c | 7 +++++++ tmk_core/common/chibios/suspend.c | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index e9ee0aefdd..690d7f38ca 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -163,6 +163,9 @@ void suspend_power_down(void) { rgblight_suspend(); # endif +# if defined(LED_MATRIX_ENABLE) + led_matrix_set_suspend_state(true); +# endif # if defined(RGB_MATRIX_ENABLE) rgb_matrix_set_suspend_state(true); # endif @@ -218,6 +221,10 @@ void suspend_wakeup_init(void) { #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) rgblight_wakeup(); #endif + +#if defined(LED_MATRIX_ENABLE) + led_matrix_set_suspend_state(false); +#endif #if defined(RGB_MATRIX_ENABLE) rgb_matrix_set_suspend_state(false); #endif diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c index 14a9aecb31..38517e06f0 100644 --- a/tmk_core/common/chibios/suspend.c +++ b/tmk_core/common/chibios/suspend.c @@ -83,6 +83,10 @@ void suspend_power_down(void) { #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) rgblight_suspend(); #endif + +#if defined(LED_MATRIX_ENABLE) + led_matrix_set_suspend_state(true); +#endif #if defined(RGB_MATRIX_ENABLE) rgb_matrix_set_suspend_state(true); #endif @@ -154,6 +158,10 @@ void suspend_wakeup_init(void) { #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) rgblight_wakeup(); #endif + +#if defined(LED_MATRIX_ENABLE) + led_matrix_set_suspend_state(false); +#endif #if defined(RGB_MATRIX_ENABLE) rgb_matrix_set_suspend_state(false); #endif -- cgit v1.2.1