]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - tmk_core/common/command.c
hhkb: Update binary
[max/tmk_keyboard.git] / tmk_core / common / command.c
index b017f2e2226722274e3c40c04670a7eed1a862db..bb471e887e5d7de3638888c1062a623f4616f9e3 100644 (file)
@@ -182,14 +182,22 @@ static bool command_common(uint8_t code)
 {
 #ifdef KEYBOARD_LOCK_ENABLE
     static host_driver_t *host_driver = 0;
+#endif
+#ifdef SLEEP_LED_ENABLE
+    static bool sleep_led_test = false;
 #endif
     switch (code) {
 #ifdef SLEEP_LED_ENABLE
         case KC_Z:
             // test breathing sleep LED
             print("Sleep LED test\n");
-            sleep_led_toggle();
-            led_set(host_keyboard_leds());
+            if (sleep_led_test) {
+                sleep_led_disable();
+                led_set(host_keyboard_leds());
+            } else {
+                sleep_led_enable();
+            }
+            sleep_led_test = !sleep_led_test;
             break;
 #endif
 #ifdef BOOTMAGIC_ENABLE
@@ -232,13 +240,13 @@ static bool command_common(uint8_t code)
             break;
         case KC_D:
             if (debug_enable) {
-                print("\ndebug: on\n");
+                print("\ndebug: off\n");
                 debug_matrix   = false;
                 debug_keyboard = false;
                 debug_mouse    = false;
                 debug_enable   = false;
             } else {
-                print("\ndebug: off\n");
+                print("\ndebug: on\n");
                 debug_enable   = true;
             }
             break;
@@ -287,6 +295,9 @@ static bool command_common(uint8_t code)
 #ifdef PROTOCOL_VUSB
             " VUSB"
 #endif
+#ifdef PROTOCOL_CHIBIOS
+            " CHIBIOS"
+#endif
 #ifdef BOOTMAGIC_ENABLE
             " BOOTMAGIC"
 #endif
@@ -324,6 +335,9 @@ static bool command_common(uint8_t code)
             print_val_hex8(host_keyboard_leds());
             print_val_hex8(keyboard_protocol);
             print_val_hex8(keyboard_idle);
+#ifdef NKRO_ENABLE
+            print_val_hex8(keyboard_nkro);
+#endif
             print_val_hex32(timer_read32());
 
 #ifdef PROTOCOL_PJRC
@@ -344,10 +358,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:
@@ -601,10 +616,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