浏览代码

Add missing LED Matrix suspend code to suspend.c (#12878)

Co-authored-by: Ryan <fauxpark@gmail.com>
Drashna Jaelre 4 年之前
父节点
当前提交
da0c551692
共有 2 个文件被更改,包括 15 次插入0 次删除
  1. 7 0
      tmk_core/common/avr/suspend.c
  2. 8 0
      tmk_core/common/chibios/suspend.c

+ 7 - 0
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

+ 8 - 0
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