Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
		
						commit
						6f9db2b48e
					
				
					 4 changed files with 50 additions and 29 deletions
				
			
		| 
						 | 
				
			
			@ -24,9 +24,6 @@
 | 
			
		|||
 | 
			
		||||
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
 | 
			
		||||
#    include "rgblight.h"
 | 
			
		||||
extern rgblight_config_t rgblight_config;
 | 
			
		||||
static bool              rgblight_enabled;
 | 
			
		||||
static bool              is_suspended;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/** \brief Suspend idle
 | 
			
		||||
| 
						 | 
				
			
			@ -104,12 +101,7 @@ static void power_down(uint8_t wdto) {
 | 
			
		|||
    // stop_all_notes();
 | 
			
		||||
#    endif /* AUDIO_ENABLE */
 | 
			
		||||
#    if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
 | 
			
		||||
    rgblight_timer_disable();
 | 
			
		||||
    if (!is_suspended) {
 | 
			
		||||
        is_suspended     = true;
 | 
			
		||||
        rgblight_enabled = rgblight_config.enable;
 | 
			
		||||
        rgblight_disable_noeeprom();
 | 
			
		||||
    }
 | 
			
		||||
    rgblight_suspend();
 | 
			
		||||
#    endif
 | 
			
		||||
    suspend_power_down_kb();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -177,11 +169,7 @@ void suspend_wakeup_init(void) {
 | 
			
		|||
#endif
 | 
			
		||||
    led_set(host_keyboard_leds());
 | 
			
		||||
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
 | 
			
		||||
    is_suspended = false;
 | 
			
		||||
    if (rgblight_enabled) {
 | 
			
		||||
        rgblight_enable_noeeprom();
 | 
			
		||||
    }
 | 
			
		||||
    rgblight_timer_enable();
 | 
			
		||||
    rgblight_wakeup();
 | 
			
		||||
#endif
 | 
			
		||||
    suspend_wakeup_init_kb();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,9 +18,6 @@
 | 
			
		|||
 | 
			
		||||
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
 | 
			
		||||
#    include "rgblight.h"
 | 
			
		||||
extern rgblight_config_t rgblight_config;
 | 
			
		||||
static bool              rgblight_enabled;
 | 
			
		||||
static bool              is_suspended;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/** \brief suspend idle
 | 
			
		||||
| 
						 | 
				
			
			@ -66,12 +63,7 @@ void suspend_power_down(void) {
 | 
			
		|||
    // shouldn't power down TPM/FTM if we want a breathing LED
 | 
			
		||||
    // also shouldn't power down USB
 | 
			
		||||
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
 | 
			
		||||
    rgblight_timer_disable();
 | 
			
		||||
    if (!is_suspended) {
 | 
			
		||||
        is_suspended     = true;
 | 
			
		||||
        rgblight_enabled = rgblight_config.enable;
 | 
			
		||||
        rgblight_disable_noeeprom();
 | 
			
		||||
    }
 | 
			
		||||
    rgblight_suspend();
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    suspend_power_down_kb();
 | 
			
		||||
| 
						 | 
				
			
			@ -136,11 +128,7 @@ void suspend_wakeup_init(void) {
 | 
			
		|||
#endif /* BACKLIGHT_ENABLE */
 | 
			
		||||
    led_set(host_keyboard_leds());
 | 
			
		||||
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
 | 
			
		||||
    is_suspended = false;
 | 
			
		||||
    if (rgblight_enabled) {
 | 
			
		||||
        rgblight_enable_noeeprom();
 | 
			
		||||
    }
 | 
			
		||||
    rgblight_timer_enable();
 | 
			
		||||
    rgblight_wakeup();
 | 
			
		||||
#endif
 | 
			
		||||
    suspend_wakeup_init_kb();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue