diff options
author | Christopher Browne <cbbrowne@ca.afilias.info> | 2016-07-04 12:32:08 -0400 |
---|---|---|
committer | Christopher Browne <cbbrowne@ca.afilias.info> | 2016-07-04 12:32:08 -0400 |
commit | 2e1cfaf73fccdfaba2d7542f00bd7c3d49998d5d (patch) | |
tree | 9d8e9c6b71116f01c56c870a9e1071760899ff77 /tmk_core/common/command.c | |
parent | 44a5f7630f18b40b36270d49449a43cd42b802f0 (diff) | |
parent | 9e01b219f32b0086728c10658928b8bffcc26ef7 (diff) |
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
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 187a2b9496..084c9fe155 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/>. */ #include <stdint.h> #include <stdbool.h> -#include <util/delay.h> +#include "wait.h" #include "keycode.h" #include "host.h" #include "keymap.h" @@ -103,12 +103,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; } @@ -217,8 +219,11 @@ static void print_version(void) " " 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"); + " AVR_ARCH: avr" STR(__AVR_ARCH__) +#endif + "\n"); return; } @@ -234,7 +239,7 @@ static void print_status(void) #ifdef NKRO_ENABLE print_val_hex8(keyboard_nkro); #endif - print_val_hex32(timer_count); + print_val_hex32(timer_read32()); #ifdef PROTOCOL_PJRC print_val_hex8(UDCON); @@ -360,7 +365,7 @@ static bool command_common(uint8_t code) stop_all_notes(); shutdown_user(); #else - _delay_ms(1000); + wait_ms(1000); #endif bootloader_jump(); // not return break; @@ -430,10 +435,11 @@ static bool command_common(uint8_t code) case MAGIC_KC(MAGIC_KEY_NKRO): clear_keyboard(); // clear to prevent stuck keys keyboard_nkro = !keyboard_nkro; - if (keyboard_nkro) + if (keyboard_nkro) { print("NKRO: on\n"); - else + } else { print("NKRO: off\n"); + } break; #endif @@ -750,10 +756,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 |