瀏覽代碼

Change suspend condition check order on ChibiOS (#24020)

Drashna Jaelre 2 年之前
父節點
當前提交
bdca9318f9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tmk_core/protocol/chibios/chibios.c

+ 1 - 1
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