Fix USB plug-in while BT mode falls to be enumerated
authortmk <hasu@tmk-kbd.com>
Wed, 26 Nov 2014 02:42:53 +0000 (11:42 +0900)
committertmk <hasu@tmk-kbd.com>
Thu, 15 Jan 2015 08:08:48 +0000 (17:08 +0900)
keyboard/hhkb_rn42/matrix.c

index 513a271e4eccdc59bf3cb18dbea37b8e4bab6c8d..22becd10509e9734c384728c87f755d19cdbdfa3 100644 (file)
@@ -183,7 +183,7 @@ void matrix_power_up(void) {
 void matrix_power_down(void) {
     if (!matrix_power) return;
     // doesn't power save while USB connection is active
-    if (USB_DeviceState == DEVICE_STATE_Configured) return;
+    if (USB_DeviceState != DEVICE_STATE_Unattached) return;
     if (timer_elapsed32(matrix_last_modified) <= MATRIX_POWER_SAVE) return;
     KEY_POWER_OFF();
     suspend_power_down();
Imprint / Impressum