X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=keyboard%2Fhhkb_rn42%2Fmatrix.c;h=22becd10509e9734c384728c87f755d19cdbdfa3;hb=9179246a1d69024449829218aa7fb967d8ccc3f5;hp=c6c444ff521efd830e8d586d56ff144b122f24e3;hpb=608ebe2686bdb3fdbd0426731cabdf6082c57b53;p=max%2Ftmk_keyboard.git diff --git a/keyboard/hhkb_rn42/matrix.c b/keyboard/hhkb_rn42/matrix.c index c6c444ff..22becd10 100644 --- a/keyboard/hhkb_rn42/matrix.c +++ b/keyboard/hhkb_rn42/matrix.c @@ -183,9 +183,9 @@ 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(WDTO_15MS); + suspend_power_down(); matrix_power = false; }