From 7ef7cdf9e31edf440c11ed66c11d4e8196948eca Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 5 Jul 2024 05:16:52 +0100 Subject: [PATCH] Align LUFA suspend logic --- tmk_core/protocol/lufa/lufa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 2142b04460a1..b0c9758d2fd5 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -836,7 +836,7 @@ void protocol_pre_task(void) { dprintln("suspending keyboard"); while (USB_DeviceState == DEVICE_STATE_Suspended) { suspend_power_down(); - if (USB_Device_RemoteWakeupEnabled && suspend_wakeup_condition()) { + if (suspend_wakeup_condition() && USB_Device_RemoteWakeupEnabled) { USB_Device_SendRemoteWakeup(); clear_keyboard();