chore: move led shutdown logic in rgb_matric.c
This commit is contained in:
committed by
Florian Didron
parent
76ba4c4fa5
commit
8f065c420b
@@ -222,9 +222,6 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
|
||||||
void suspend_power_down_kb(void) {
|
void suspend_power_down_kb(void) {
|
||||||
#if RGB_DISABLE_WHEN_USB_SUSPENDED == true
|
|
||||||
rgb_matrix_set_color_all(0, 0, 0);
|
|
||||||
#endif
|
|
||||||
rgb_matrix_set_suspend_state(true);
|
rgb_matrix_set_suspend_state(true);
|
||||||
suspend_power_down_user();
|
suspend_power_down_user();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,9 +22,6 @@ keyboard_config_t keyboard_config;
|
|||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
void suspend_power_down_kb(void) {
|
void suspend_power_down_kb(void) {
|
||||||
#if RGB_DISABLE_WHEN_USB_SUSPENDED == true
|
|
||||||
rgb_matrix_set_color_all(0, 0, 0);
|
|
||||||
#endif
|
|
||||||
rgb_matrix_set_suspend_state(true);
|
rgb_matrix_set_suspend_state(true);
|
||||||
suspend_power_down_user();
|
suspend_power_down_user();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -436,6 +436,9 @@ void rgb_matrix_init(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void rgb_matrix_set_suspend_state(bool state) {
|
void rgb_matrix_set_suspend_state(bool state) {
|
||||||
|
if (state && RGB_DISABLE_WHEN_USB_SUSPENDED) {
|
||||||
|
rgb_matrix_set_color_all(0, 0, 0);
|
||||||
|
}
|
||||||
g_suspend_state = state;
|
g_suspend_state = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user