commit: bdca9318f9f6a7b4ea697113a2e0b3117a67e093
parent e07f752a5704640052963ff7777bd3b87a429f6f
Author: Drashna Jaelre <drashna@live.com>
Date: Wed, 3 Jul 2024 19:13:00 -0700
Change suspend condition check order on ChibiOS (#24020)
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tmk_core/protocol/chibios/chibios.c b/tmk_core/protocol/chibios/chibios.c
@@ -184,7 +184,7 @@ void protocol_pre_task(void) {
/* Do this in the suspended state */
suspend_power_down(); // on AVR this deep sleeps for 15ms
/* Remote wakeup */
- if ((USB_DRIVER.status & USB_GETSTATUS_REMOTE_WAKEUP_ENABLED) && suspend_wakeup_condition()) {
+ if (suspend_wakeup_condition() && (USB_DRIVER.status & USB_GETSTATUS_REMOTE_WAKEUP_ENABLED)) {
usbWakeupHost(&USB_DRIVER);
# if USB_SUSPEND_WAKEUP_DELAY > 0
// Some hubs, kvm switches, and monitors do