X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fcommand.c;h=d3884d9fa9725d9e3839be04ff7542ad78f8e824;hb=8b1cdd1e3d27cce830c36f9604e5f69337b2c83e;hp=fc5aad5c1ded3de032d4667323b4dd96cbf28298;hpb=cb1ac2a3edf637a3e2ecb53f0627212d1f5abb08;p=qmk_firmware.git diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index fc5aad5c1..d3884d9fa 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -151,17 +151,17 @@ static void command_common_help(void) "0-9: Switch to Layer 0-9\n" #endif - STR(MAGIC_KEY_LAYER0_ALT1 ) ": Switch to Layer 0 (alternate key 1)\n" - STR(MAGIC_KEY_LAYER0_ALT2 ) ": Switch to Layer 0 (alternate key 2)\n" - STR(MAGIC_KEY_BOOTLOADER ) ": Jump to Bootloader (Reset)\n" + STR(MAGIC_KEY_LAYER0_ALT ) ": Switch to Layer 0 (alternate)\n" + + STR(MAGIC_KEY_BOOTLOADER ) ": Jump to Bootloader\n" + STR(MAGIC_KEY_BOOTLOADER_ALT) ": Jump to Bootloader (alternate)\n" #ifdef KEYBOARD_LOCK_ENABLE - STR(MAGIC_KEY_LOCK ) ": Lock\n" + STR(MAGIC_KEY_LOCK ) ": Lock Keyboard\n" #endif -#ifdef BOOTMAGIC_ENABLE STR(MAGIC_KEY_EEPROM ) ": Print EEPROM Settings\n" -#endif + STR(MAGIC_KEY_EEPROM_CLEAR) ": Clear EEPROM\n" #ifdef NKRO_ENABLE STR(MAGIC_KEY_NKRO ) ": NKRO Toggle\n" @@ -181,7 +181,11 @@ static void print_version(void) print("VID: " STR(VENDOR_ID) "(" STR(MANUFACTURER) ") " "PID: " STR(PRODUCT_ID) "(" STR(PRODUCT) ") " "VER: " STR(DEVICE_VER) "\n"); +#ifdef SKIP_VERSION + print("BUILD: (" __DATE__ ")\n"); +#else print("BUILD: " STR(QMK_VERSION) " (" __TIME__ " " __DATE__ ")\n"); +#endif /* build options */ print("OPTIONS:" @@ -235,8 +239,11 @@ static void print_status(void) print("\n\t- Status -\n"); print_val_hex8(host_keyboard_leds()); +#ifndef PROTOCOL_VUSB + // these aren't set on the V-USB protocol, so we just ignore them for now print_val_hex8(keyboard_protocol); print_val_hex8(keyboard_idle); +#endif #ifdef NKRO_ENABLE print_val_hex8(keymap_config.nkro); #endif @@ -258,7 +265,6 @@ static void print_status(void) return; } -#ifdef BOOTMAGIC_ENABLE static void print_eeconfig(void) { @@ -298,7 +304,6 @@ static void print_eeconfig(void) #endif /* !NO_PRINT */ } -#endif /* BOOTMAGIC_ENABLE */ static bool command_common(uint8_t code) { @@ -319,14 +324,17 @@ static bool command_common(uint8_t code) break; #endif -#ifdef BOOTMAGIC_ENABLE - // print stored eeprom config case MAGIC_KC(MAGIC_KEY_EEPROM): print("eeconfig:\n"); print_eeconfig(); break; -#endif + + // clear eeprom + case MAGIC_KC(MAGIC_KEY_EEPROM_CLEAR): + print("Clearing EEPROM\n"); + eeconfig_init(); + break; #ifdef KEYBOARD_LOCK_ENABLE @@ -345,8 +353,8 @@ static bool command_common(uint8_t code) #endif // print help - case MAGIC_KC(MAGIC_KEY_HELP1): - case MAGIC_KC(MAGIC_KEY_HELP2): + case MAGIC_KC(MAGIC_KEY_HELP): + case MAGIC_KC(MAGIC_KEY_HELP_ALT): command_common_help(); break; @@ -363,6 +371,7 @@ static bool command_common(uint8_t code) // jump to bootloader case MAGIC_KC(MAGIC_KEY_BOOTLOADER): + case MAGIC_KC(MAGIC_KEY_BOOTLOADER_ALT): clear_keyboard(); // clear to prevent stuck keys print("\n\nJumping to bootloader... "); #ifdef AUDIO_ENABLE @@ -379,9 +388,6 @@ static bool command_common(uint8_t code) debug_enable = !debug_enable; if (debug_enable) { print("\ndebug: on\n"); - debug_matrix = true; - debug_keyboard = true; - debug_mouse = true; } else { print("\ndebug: off\n"); debug_matrix = false; @@ -449,8 +455,7 @@ static bool command_common(uint8_t code) // switch layers - case MAGIC_KC(MAGIC_KEY_LAYER0_ALT1): - case MAGIC_KC(MAGIC_KEY_LAYER0_ALT2): + case MAGIC_KC(MAGIC_KEY_LAYER0_ALT): switch_default_layer(0); break;