X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Fcommand.c;h=cb98e1d5f206803fbcc84cb2266aebaeed564502;hb=9a106537f64fe61af6048b41262f002ce6a716d9;hp=a18eb780063053bd97c95099c57d9c25aa1cb67c;hpb=09bd1aef12e42b44f90b8275ae95b578294957c0;p=max%2Ftmk_keyboard.git diff --git a/common/command.c b/common/command.c index a18eb780..cb98e1d5 100644 --- a/common/command.c +++ b/common/command.c @@ -98,7 +98,6 @@ bool command_extra(uint8_t code) ***********************************************************/ static void command_common_help(void) { - print_enable = true; print("\n\n----- Command Help -----\n"); print("c: enter console mode\n"); print("d: toggle debug enable\n"); @@ -123,6 +122,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; @@ -135,16 +135,29 @@ static void print_eeprom_config(void) eebyte = eeconfig_read_keyconf(); print("keyconf: "); print_hex8(eebyte); print("\n"); + + keyconf kc; + kc = (keyconf){ .raw = eebyte }; + print("keyconf.swap_control_capslock: "); print_hex8(kc.swap_control_capslock); print("\n"); + print("keyconf.capslock_to_control: "); print_hex8(kc.capslock_to_control); print("\n"); + print("keyconf.swap_lalt_lgui: "); print_hex8(kc.swap_lalt_lgui); print("\n"); + print("keyconf.swap_ralt_rgui: "); print_hex8(kc.swap_ralt_rgui); print("\n"); + print("keyconf.no_gui: "); print_hex8(kc.no_gui); print("\n"); + 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(); @@ -160,7 +173,6 @@ static bool command_common(uint8_t code) command_common_help(); break; case KC_C: - print_enable = true; debug_matrix = false; debug_keyboard = false; debug_mouse = false; @@ -226,15 +238,6 @@ static bool command_common(uint8_t code) case KC_T: // print timer print_val_hex32(timer_count); break; - case KC_P: // print toggle - if (print_enable) { - print("print disabled.\n"); - print_enable = false; - } else { - print_enable = true; - print("print enabled.\n"); - } - break; case KC_S: print("\n\n----- Status -----\n"); print_val_hex8(host_keyboard_leds()); @@ -307,7 +310,6 @@ static bool command_common(uint8_t code) ***********************************************************/ static void command_console_help(void) { - print_enable = true; print("\n\n----- Console Help -----\n"); print("ESC/q: quit\n"); #ifdef MOUSEKEY_ENABLE