Skip to content

Commit

Permalink
Swap order of RGB/LED functions to match
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan <fauxpark@gmail.com>
  • Loading branch information
drashna and fauxpark committed May 13, 2021
1 parent c9e5773 commit ac56c2d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
15 changes: 7 additions & 8 deletions tmk_core/common/avr/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ void suspend_power_down(void) {
rgblight_suspend();
# endif

# if defined(RGB_MATRIX_ENABLE)
rgb_matrix_set_suspend_state(true);
# 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

// Enter sleep state if possible (ie, the MCU has a watchdog timeout interrupt)
# if defined(WDT_vect)
power_down(WDTO_15MS);
Expand Down Expand Up @@ -222,13 +222,12 @@ void suspend_wakeup_init(void) {
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_wakeup();
#endif
#if defined(RGB_MATRIX_ENABLE)
rgb_matrix_set_suspend_state(false);
#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

suspend_wakeup_init_kb();
}
Expand Down
13 changes: 6 additions & 7 deletions tmk_core/common/chibios/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,12 @@ void suspend_power_down(void) {
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_suspend();
#endif
#if defined(RGB_MATRIX_ENABLE)
rgb_matrix_set_suspend_state(true);
#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
#ifdef AUDIO_ENABLE
stop_all_notes();
#endif /* AUDIO_ENABLE */
Expand Down Expand Up @@ -158,11 +157,11 @@ void suspend_wakeup_init(void) {
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_wakeup();
#endif
#if defined(RGB_MATRIX_ENABLE)
rgb_matrix_set_suspend_state(false);
#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
suspend_wakeup_init_kb();
}

0 comments on commit ac56c2d

Please sign in to comment.