diff --git a/tmk_core/protocol/chibios/chibios.c b/tmk_core/protocol/chibios/chibios.c index 10a976608ad..52aea241ffe 100644 --- a/tmk_core/protocol/chibios/chibios.c +++ b/tmk_core/protocol/chibios/chibios.c @@ -49,6 +49,8 @@ #include "suspend.h" #include "wait.h" +#define USB_GETSTATUS_REMOTE_WAKEUP_ENABLED (2U) + /* ------------------------- * TMK host driver defs * ------------------------- @@ -187,7 +189,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 (suspend_wakeup_condition()) { + if ((USB_DRIVER.status & USB_GETSTATUS_REMOTE_WAKEUP_ENABLED) && suspend_wakeup_condition()) { usbWakeupHost(&USB_DRIVER); restart_usb_driver(&USB_DRIVER); }