Add build option BOOTMAGIC_ENABLE
This commit is contained in:
		
							parent
							
								
									d055e0633e
								
							
						
					
					
						commit
						ef8439bddb
					
				
					 5 changed files with 19 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -123,6 +123,7 @@ static void command_common_help(void)
 | 
			
		|||
    print("Paus:	jump to bootloader\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifdef BOOTMAGIC_ENABLE
 | 
			
		||||
static void print_eeprom_config(void)
 | 
			
		||||
{
 | 
			
		||||
    uint8_t eebyte;
 | 
			
		||||
| 
						 | 
				
			
			@ -145,15 +146,18 @@ static void print_eeprom_config(void)
 | 
			
		|||
    print("keyconf.swap_grave_esc: "); print_hex8(kc.swap_grave_esc); print("\n");
 | 
			
		||||
    print("keyconf.swap_backslash_backspace: "); print_hex8(kc.swap_backslash_backspace); print("\n");
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static bool command_common(uint8_t code)
 | 
			
		||||
{
 | 
			
		||||
    static host_driver_t *host_driver = 0;
 | 
			
		||||
    switch (code) {
 | 
			
		||||
#ifdef BOOTMAGIC_ENABLE
 | 
			
		||||
        case KC_E:
 | 
			
		||||
            print("eeprom config\n");
 | 
			
		||||
            print_eeprom_config();
 | 
			
		||||
            break;
 | 
			
		||||
#endif
 | 
			
		||||
        case KC_CAPSLOCK:
 | 
			
		||||
            if (host_get_driver()) {
 | 
			
		||||
                host_driver = host_get_driver();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,10 +29,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		|||
#include "util.h"
 | 
			
		||||
#include "sendchar.h"
 | 
			
		||||
#include "bootmagic.h"
 | 
			
		||||
#ifdef MOUSEKEY_ENABLE
 | 
			
		||||
#include "mousekey.h"
 | 
			
		||||
#endif
 | 
			
		||||
#include "eeconfig.h"
 | 
			
		||||
#include "mousekey.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef MATRIX_HAS_GHOST
 | 
			
		||||
| 
						 | 
				
			
			@ -64,6 +62,7 @@ void keyboard_init(void)
 | 
			
		|||
    ps2_mouse_init();
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef BOOTMAGIC_ENABLE
 | 
			
		||||
    bootmagic();
 | 
			
		||||
 | 
			
		||||
    if (eeconfig_is_enabled()) {
 | 
			
		||||
| 
						 | 
				
			
			@ -77,6 +76,7 @@ void keyboard_init(void)
 | 
			
		|||
    } else {
 | 
			
		||||
        eeconfig_init();
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue