Skip to content

Commit

Permalink
chore: move led shutdown logic in rgb_matric.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Didron authored and fdidron committed Aug 17, 2019
1 parent 76ba4c4 commit 8f065c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions keyboards/ergodox_ez/ergodox_ez.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,6 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
#ifdef RGB_MATRIX_ENABLE

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);
suspend_power_down_user();
}
Expand Down
3 changes: 0 additions & 3 deletions keyboards/planck/ez/ez.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ keyboard_config_t keyboard_config;

#ifdef RGB_MATRIX_ENABLE
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);
suspend_power_down_user();
}
Expand Down
3 changes: 3 additions & 0 deletions quantum/rgb_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,9 @@ void rgb_matrix_init(void) {
}

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;
}

Expand Down

0 comments on commit 8f065c4

Please sign in to comment.