Satisfaction 75 turn off backlight on suspend, restore config on wakeup (#11774)
* Satisfaction 75 turn off backlight on suspend, restore config on wakeup * Disable SLEEP_LED_ENABLE because it has no effect
This commit is contained in:
		
							parent
							
								
									81fd005af9
								
							
						
					
					
						commit
						4a7a9e9951
					
				
					 2 changed files with 16 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -80,6 +80,21 @@ void backlight_init_ports(void) {
 | 
			
		|||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void suspend_power_down_user(void) {
 | 
			
		||||
    backlight_set(0);
 | 
			
		||||
}
 | 
			
		||||
void suspend_wakeup_init_user(void) {
 | 
			
		||||
  if(kb_backlight_config.enable){
 | 
			
		||||
    if(kb_backlight_config.breathing){
 | 
			
		||||
      breathing_enable();
 | 
			
		||||
    } else{
 | 
			
		||||
      backlight_set(kb_backlight_config.level);
 | 
			
		||||
    }
 | 
			
		||||
  } else {
 | 
			
		||||
    backlight_set(0);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void backlight_set(uint8_t level) {
 | 
			
		||||
  uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS));
 | 
			
		||||
  if (level == 0) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue