diff options
Diffstat (limited to 'tmk_core/common/chibios/suspend.c')
| -rw-r--r-- | tmk_core/common/chibios/suspend.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c index 49e20641f..38517e06f 100644 --- a/tmk_core/common/chibios/suspend.c +++ b/tmk_core/common/chibios/suspend.c | |||
| @@ -24,6 +24,13 @@ | |||
| 24 | # include "rgblight.h" | 24 | # include "rgblight.h" |
| 25 | #endif | 25 | #endif |
| 26 | 26 | ||
| 27 | #ifdef LED_MATRIX_ENABLE | ||
| 28 | # include "led_matrix.h" | ||
| 29 | #endif | ||
| 30 | #ifdef RGB_MATRIX_ENABLE | ||
| 31 | # include "rgb_matrix.h" | ||
| 32 | #endif | ||
| 33 | |||
| 27 | /** \brief suspend idle | 34 | /** \brief suspend idle |
| 28 | * | 35 | * |
| 29 | * FIXME: needs doc | 36 | * FIXME: needs doc |
| @@ -53,6 +60,13 @@ void suspend_power_down(void) { | |||
| 53 | backlight_set(0); | 60 | backlight_set(0); |
| 54 | #endif | 61 | #endif |
| 55 | 62 | ||
| 63 | #ifdef LED_MATRIX_ENABLE | ||
| 64 | led_matrix_task(); | ||
| 65 | #endif | ||
| 66 | #ifdef RGB_MATRIX_ENABLE | ||
| 67 | rgb_matrix_task(); | ||
| 68 | #endif | ||
| 69 | |||
| 56 | // Turn off LED indicators | 70 | // Turn off LED indicators |
| 57 | uint8_t leds_off = 0; | 71 | uint8_t leds_off = 0; |
| 58 | #if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE) | 72 | #if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE) |
| @@ -69,6 +83,13 @@ void suspend_power_down(void) { | |||
| 69 | #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) | 83 | #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) |
| 70 | rgblight_suspend(); | 84 | rgblight_suspend(); |
| 71 | #endif | 85 | #endif |
| 86 | |||
| 87 | #if defined(LED_MATRIX_ENABLE) | ||
| 88 | led_matrix_set_suspend_state(true); | ||
| 89 | #endif | ||
| 90 | #if defined(RGB_MATRIX_ENABLE) | ||
| 91 | rgb_matrix_set_suspend_state(true); | ||
| 92 | #endif | ||
| 72 | #ifdef AUDIO_ENABLE | 93 | #ifdef AUDIO_ENABLE |
| 73 | stop_all_notes(); | 94 | stop_all_notes(); |
| 74 | #endif /* AUDIO_ENABLE */ | 95 | #endif /* AUDIO_ENABLE */ |
| @@ -137,5 +158,12 @@ void suspend_wakeup_init(void) { | |||
| 137 | #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) | 158 | #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) |
| 138 | rgblight_wakeup(); | 159 | rgblight_wakeup(); |
| 139 | #endif | 160 | #endif |
| 161 | |||
| 162 | #if defined(LED_MATRIX_ENABLE) | ||
| 163 | led_matrix_set_suspend_state(false); | ||
| 164 | #endif | ||
| 165 | #if defined(RGB_MATRIX_ENABLE) | ||
| 166 | rgb_matrix_set_suspend_state(false); | ||
| 167 | #endif | ||
| 140 | suspend_wakeup_init_kb(); | 168 | suspend_wakeup_init_kb(); |
| 141 | } | 169 | } |
