X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fcommand.c;h=6920970020cc3f0a8ec72e645940b39132074362;hb=b47a88f4a5c3e054539f4113cdf13cf8d2c65545;hp=a53cac61486253b48d8fe188fa6a476a076726e7;hpb=e8a4a63ec45cf5052d8a054182ab83fdbafc3ff6;p=max%2Ftmk_keyboard.git diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index a53cac61..69209700 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -16,7 +16,7 @@ along with this program. If not, see . */ #include #include -#include +#include "wait.h" #include "keycode.h" #include "host.h" #include "keymap.h" @@ -97,12 +97,14 @@ bool command_proc(uint8_t code) bool command_extra(uint8_t code) __attribute__ ((weak)); bool command_extra(uint8_t code) { + (void)code; return false; } bool command_console_extra(uint8_t code) __attribute__ ((weak)); bool command_console_extra(uint8_t code) { + (void)code; return false; } @@ -178,7 +180,9 @@ static void print_eeconfig(void) static bool command_common(uint8_t code) { +#ifdef KEYBOARD_LOCK_ENABLE static host_driver_t *host_driver = 0; +#endif switch (code) { #ifdef SLEEP_LED_ENABLE case KC_Z: @@ -223,7 +227,7 @@ static bool command_common(uint8_t code) case KC_PAUSE: clear_keyboard(); print("\n\nbootloader... "); - _delay_ms(1000); + wait_ms(1000); bootloader_jump(); // not return break; case KC_D: @@ -283,6 +287,9 @@ static bool command_common(uint8_t code) #ifdef PROTOCOL_VUSB " VUSB" #endif +#ifdef PROTOCOL_CHIBIOS + " CHIBIOS" +#endif #ifdef BOOTMAGIC_ENABLE " BOOTMAGIC" #endif @@ -307,15 +314,23 @@ static bool command_common(uint8_t code) " " STR(BOOTLOADER_SIZE) "\n"); print("GCC: " STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__) +#if defined(__AVR__) " AVR-LIBC: " __AVR_LIBC_VERSION_STRING__ " AVR_ARCH: avr" STR(__AVR_ARCH__) "\n"); +#elif defined(__arm__) + // TODO + ); +#endif break; case KC_S: print("\n\t- Status -\n"); print_val_hex8(host_keyboard_leds()); print_val_hex8(keyboard_protocol); print_val_hex8(keyboard_idle); - print_val_hex32(timer_count); +#ifdef NKRO_ENABLE + print_val_hex8(keyboard_nkro); +#endif + print_val_hex32(timer_read32()); #ifdef PROTOCOL_PJRC print_val_hex8(UDCON); @@ -335,10 +350,11 @@ static bool command_common(uint8_t code) case KC_N: clear_keyboard(); //Prevents stuck keys. keyboard_nkro = !keyboard_nkro; - if (keyboard_nkro) + if (keyboard_nkro) { print("NKRO: on\n"); - else + } else { print("NKRO: off\n"); + } break; #endif case KC_ESC: @@ -592,10 +608,11 @@ static bool mousekey_console(uint8_t code) print("?"); return false; } - if (mousekey_param) + if (mousekey_param) { xprintf("M%d> ", mousekey_param); - else + } else { print("M>" ); + } return true; } #endif