diff options
Diffstat (limited to 'tmk_core/common/command.c')
-rw-r--r-- | tmk_core/common/command.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index 187a2b949..084c9fe15 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c | |||
@@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | #include <stdint.h> | 17 | #include <stdint.h> |
18 | #include <stdbool.h> | 18 | #include <stdbool.h> |
19 | #include <util/delay.h> | 19 | #include "wait.h" |
20 | #include "keycode.h" | 20 | #include "keycode.h" |
21 | #include "host.h" | 21 | #include "host.h" |
22 | #include "keymap.h" | 22 | #include "keymap.h" |
@@ -103,12 +103,14 @@ bool command_proc(uint8_t code) | |||
103 | bool command_extra(uint8_t code) __attribute__ ((weak)); | 103 | bool command_extra(uint8_t code) __attribute__ ((weak)); |
104 | bool command_extra(uint8_t code) | 104 | bool command_extra(uint8_t code) |
105 | { | 105 | { |
106 | (void)code; | ||
106 | return false; | 107 | return false; |
107 | } | 108 | } |
108 | 109 | ||
109 | bool command_console_extra(uint8_t code) __attribute__ ((weak)); | 110 | bool command_console_extra(uint8_t code) __attribute__ ((weak)); |
110 | bool command_console_extra(uint8_t code) | 111 | bool command_console_extra(uint8_t code) |
111 | { | 112 | { |
113 | (void)code; | ||
112 | return false; | 114 | return false; |
113 | } | 115 | } |
114 | 116 | ||
@@ -217,8 +219,11 @@ static void print_version(void) | |||
217 | " " STR(BOOTLOADER_SIZE) "\n"); | 219 | " " STR(BOOTLOADER_SIZE) "\n"); |
218 | 220 | ||
219 | print("GCC: " STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__) | 221 | print("GCC: " STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__) |
222 | #if defined(__AVR__) | ||
220 | " AVR-LIBC: " __AVR_LIBC_VERSION_STRING__ | 223 | " AVR-LIBC: " __AVR_LIBC_VERSION_STRING__ |
221 | " AVR_ARCH: avr" STR(__AVR_ARCH__) "\n"); | 224 | " AVR_ARCH: avr" STR(__AVR_ARCH__) |
225 | #endif | ||
226 | "\n"); | ||
222 | 227 | ||
223 | return; | 228 | return; |
224 | } | 229 | } |
@@ -234,7 +239,7 @@ static void print_status(void) | |||
234 | #ifdef NKRO_ENABLE | 239 | #ifdef NKRO_ENABLE |
235 | print_val_hex8(keyboard_nkro); | 240 | print_val_hex8(keyboard_nkro); |
236 | #endif | 241 | #endif |
237 | print_val_hex32(timer_count); | 242 | print_val_hex32(timer_read32()); |
238 | 243 | ||
239 | #ifdef PROTOCOL_PJRC | 244 | #ifdef PROTOCOL_PJRC |
240 | print_val_hex8(UDCON); | 245 | print_val_hex8(UDCON); |
@@ -360,7 +365,7 @@ static bool command_common(uint8_t code) | |||
360 | stop_all_notes(); | 365 | stop_all_notes(); |
361 | shutdown_user(); | 366 | shutdown_user(); |
362 | #else | 367 | #else |
363 | _delay_ms(1000); | 368 | wait_ms(1000); |
364 | #endif | 369 | #endif |
365 | bootloader_jump(); // not return | 370 | bootloader_jump(); // not return |
366 | break; | 371 | break; |
@@ -430,10 +435,11 @@ static bool command_common(uint8_t code) | |||
430 | case MAGIC_KC(MAGIC_KEY_NKRO): | 435 | case MAGIC_KC(MAGIC_KEY_NKRO): |
431 | clear_keyboard(); // clear to prevent stuck keys | 436 | clear_keyboard(); // clear to prevent stuck keys |
432 | keyboard_nkro = !keyboard_nkro; | 437 | keyboard_nkro = !keyboard_nkro; |
433 | if (keyboard_nkro) | 438 | if (keyboard_nkro) { |
434 | print("NKRO: on\n"); | 439 | print("NKRO: on\n"); |
435 | else | 440 | } else { |
436 | print("NKRO: off\n"); | 441 | print("NKRO: off\n"); |
442 | } | ||
437 | break; | 443 | break; |
438 | #endif | 444 | #endif |
439 | 445 | ||
@@ -750,10 +756,11 @@ static bool mousekey_console(uint8_t code) | |||
750 | print("?"); | 756 | print("?"); |
751 | return false; | 757 | return false; |
752 | } | 758 | } |
753 | if (mousekey_param) | 759 | if (mousekey_param) { |
754 | xprintf("M%d> ", mousekey_param); | 760 | xprintf("M%d> ", mousekey_param); |
755 | else | 761 | } else { |
756 | print("M>" ); | 762 | print("M>" ); |
763 | } | ||
757 | return true; | 764 | return true; |
758 | } | 765 | } |
759 | #endif | 766 | #endif |