summary refs log tree commit diff
path: root/tmk_core/common/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common/command.c')
-rw-r--r--tmk_core/common/command.c23
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