Store backlight breathing state in EEPROM (#6105)
* Store backlight breathing state in EEPROM * Reduce backlight_config.level from 6 bits to 4 (max 15 "on" levels) * Error out if BACKLIGHT_LEVELS is > 15 * Remove mention of default backlight pin in rules.mk template * Remove pointless comment
This commit is contained in:
		
							parent
							
								
									e2dfb787da
								
							
						
					
					
						commit
						a32f7e1a25
					
				
					 5 changed files with 82 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -708,7 +708,7 @@ bool process_record_quantum(keyrecord_t *record) {
 | 
			
		|||
#if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_BREATHING)
 | 
			
		||||
    case BL_BRTG: {
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        breathing_toggle();
 | 
			
		||||
        backlight_toggle_breathing();
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -1196,6 +1196,12 @@ void backlight_init_ports(void)
 | 
			
		|||
    setPinOutput(backlight_pin);
 | 
			
		||||
    backlight_on(backlight_pin);
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
  #ifdef BACKLIGHT_BREATHING
 | 
			
		||||
  if (is_backlight_breathing()) {
 | 
			
		||||
    breathing_enable();
 | 
			
		||||
  }
 | 
			
		||||
  #endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
__attribute__ ((weak))
 | 
			
		||||
| 
						 | 
				
			
			@ -1500,7 +1506,9 @@ void backlight_init_ports(void)
 | 
			
		|||
 | 
			
		||||
  backlight_init();
 | 
			
		||||
  #ifdef BACKLIGHT_BREATHING
 | 
			
		||||
    breathing_enable();
 | 
			
		||||
    if (is_backlight_breathing()) {
 | 
			
		||||
      breathing_enable();
 | 
			
		||||
    }
 | 
			
		||||
  #endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -91,8 +91,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		|||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
 | 
			
		||||
//#define MATRIX_HAS_GHOST
 | 
			
		||||
 | 
			
		||||
/* number of backlight levels */
 | 
			
		||||
 | 
			
		||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
 | 
			
		||||
#define LOCKING_SUPPORT_ENABLE
 | 
			
		||||
/* Locking resynchronize hack */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -70,7 +70,7 @@ COMMAND_ENABLE = yes        # Commands for debug and configuration
 | 
			
		|||
SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
 | 
			
		||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
 | 
			
		||||
NKRO_ENABLE = no            # USB Nkey Rollover
 | 
			
		||||
BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality on B7 by default
 | 
			
		||||
BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
 | 
			
		||||
RGBLIGHT_ENABLE = no        # Enable keyboard RGB underglow
 | 
			
		||||
MIDI_ENABLE = no            # MIDI support (+2400 to 4200, depending on config)
 | 
			
		||||
UNICODE_ENABLE = no         # Unicode
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue