X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fcommand.c;h=d3884d9fa9725d9e3839be04ff7542ad78f8e824;hb=6af77551c67c846b06c596cbd367d66c755f8051;hp=5f29bc0b4e84ec6ad0407cb63f3ba4b818749550;hpb=7a1eca784fee10ed77fdc719f7715cc76facbcf0;p=qmk_firmware.git diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index 5f29bc0b4..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 @@ -446,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;