summaryrefslogtreecommitdiff
path: root/tmk_core
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/avr/suspend.c7
-rw-r--r--tmk_core/common/chibios/suspend.c6
2 files changed, 13 insertions, 0 deletions
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();
}
diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c
index b3949185e9..1f4f93c455 100644
--- a/tmk_core/common/chibios/suspend.c
+++ b/tmk_core/common/chibios/suspend.c
@@ -83,6 +83,9 @@ void suspend_power_down(void) {
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_suspend();
#endif
+# if defined(RGB_MATRIX_ENABLE)
+ rgb_matrix_set_suspend_state(true);
+# endif
#ifdef AUDIO_ENABLE
stop_all_notes();
#endif /* AUDIO_ENABLE */
@@ -151,5 +154,8 @@ 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();
}