Fix USB plug-in while BT mode falls to be enumerated

This commit is contained in:
tmk 2014-11-26 11:42:53 +09:00
parent 05795cb003
commit 9179246a1d
1 changed files with 1 additions and 1 deletions

View 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();