Convert eeconfig_init_kb implementations to config (#24087)
				
					
				
			This commit is contained in:
		
							parent
							
								
									2c2885639e
								
							
						
					
					
						commit
						52ee9f2ce1
					
				
					 31 changed files with 63 additions and 210 deletions
				
			
		| 
						 | 
				
			
			@ -23,6 +23,11 @@
 | 
			
		|||
            "resync": true
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "audio": {
 | 
			
		||||
        "default": {
 | 
			
		||||
            "clicky": false
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "matrix_pins": {
 | 
			
		||||
        "cols": ["B7", "B0", "F5", "D5", "B1", "B2", "B3", "D3", "D2", "C7", "B6", "B5", "B4", "D7", "D6", "D4"],
 | 
			
		||||
        "rows": ["F0", "E6", "F4", "F6", "F7"]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,26 +30,6 @@ float tone_device_indication[][2] = SONG(FANTASIE_IMPROMPTU);
 | 
			
		|||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
// We want to enable audio clicky (i.e. compile it into firmware),
 | 
			
		||||
// but not have it "turned on" by default.
 | 
			
		||||
#ifdef AUDIO_CLICKY
 | 
			
		||||
 | 
			
		||||
#include "process_clicky.h"
 | 
			
		||||
extern audio_config_t audio_config;
 | 
			
		||||
 | 
			
		||||
void eeconfig_init_kb(void) {
 | 
			
		||||
    // Reset Keyboard EEPROM value to blank, rather than to a set value
 | 
			
		||||
    eeconfig_update_kb(0);
 | 
			
		||||
 | 
			
		||||
    // Need to read here because this isn't done before calling eeconfig_init_kb()
 | 
			
		||||
    audio_config.raw = eeconfig_read_audio();
 | 
			
		||||
    // ...and this call needs audio_config initialized.
 | 
			
		||||
    clicky_off();
 | 
			
		||||
 | 
			
		||||
    eeconfig_init_user();
 | 
			
		||||
}
 | 
			
		||||
#endif // AUDIO_CLICKY
 | 
			
		||||
 | 
			
		||||
void keyboard_pre_init_kb(void) {
 | 
			
		||||
    gpio_set_pin_output(F1);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue