diff options
Diffstat (limited to 'quantum/led_matrix.c')
| -rw-r--r-- | quantum/led_matrix.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c index 5dd37dff1..3674c9b97 100644 --- a/quantum/led_matrix.c +++ b/quantum/led_matrix.c | |||
| @@ -75,7 +75,7 @@ last_hit_t g_last_hit_tracker; | |||
| 75 | #endif // LED_MATRIX_KEYREACTIVE_ENABLED | 75 | #endif // LED_MATRIX_KEYREACTIVE_ENABLED |
| 76 | 76 | ||
| 77 | // internals | 77 | // internals |
| 78 | static bool suspend_state = false; | 78 | static bool suspend_state = false; |
| 79 | static uint8_t led_last_enable = UINT8_MAX; | 79 | static uint8_t led_last_enable = UINT8_MAX; |
| 80 | static uint8_t led_last_effect = UINT8_MAX; | 80 | static uint8_t led_last_effect = UINT8_MAX; |
| 81 | static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false}; | 81 | static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false}; |
| @@ -324,12 +324,11 @@ void led_matrix_task(void) { | |||
| 324 | 324 | ||
| 325 | // Ideally we would also stop sending zeros to the LED driver PWM buffers | 325 | // Ideally we would also stop sending zeros to the LED driver PWM buffers |
| 326 | // while suspended and just do a software shutdown. This is a cheap hack for now. | 326 | // while suspended and just do a software shutdown. This is a cheap hack for now. |
| 327 | bool suspend_backlight = | 327 | bool suspend_backlight = suspend_state || |
| 328 | suspend_state || | ||
| 329 | #if LED_DISABLE_TIMEOUT > 0 | 328 | #if LED_DISABLE_TIMEOUT > 0 |
| 330 | (led_anykey_timer > (uint32_t)LED_DISABLE_TIMEOUT) || | 329 | (led_anykey_timer > (uint32_t)LED_DISABLE_TIMEOUT) || |
| 331 | #endif // LED_DISABLE_TIMEOUT > 0 | 330 | #endif // LED_DISABLE_TIMEOUT > 0 |
| 332 | false; | 331 | false; |
| 333 | 332 | ||
| 334 | uint8_t effect = suspend_backlight || !led_matrix_eeconfig.enable ? 0 : led_matrix_eeconfig.mode; | 333 | uint8_t effect = suspend_backlight || !led_matrix_eeconfig.enable ? 0 : led_matrix_eeconfig.mode; |
| 335 | 334 | ||
