summaryrefslogtreecommitdiff
path: root/keyboard
diff options
context:
space:
mode:
authortmk <hasu@tmk-kbd.com>2014-11-26 11:42:53 +0900
committertmk <hasu@tmk-kbd.com>2015-01-15 17:08:48 +0900
commit9179246a1d69024449829218aa7fb967d8ccc3f5 (patch)
treeacb8340791e6a8a9488319a019232fe336655335 /keyboard
parent05795cb0034e885bec37f782cfc6bddcae262637 (diff)
Fix USB plug-in while BT mode falls to be enumerated
Diffstat (limited to 'keyboard')
-rw-r--r--keyboard/hhkb_rn42/matrix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/keyboard/hhkb_rn42/matrix.c b/keyboard/hhkb_rn42/matrix.c
index 513a271e4e..22becd1050 100644
--- a/keyboard/hhkb_rn42/matrix.c
+++ b/keyboard/hhkb_rn42/matrix.c
@@ -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();