Merge remote-tracking branch 'origin/develop' into xap

This commit is contained in:
QMK Bot 2023-06-26 08:37:34 +00:00
commit 78680e1f09

View File

@ -49,6 +49,8 @@
#include "suspend.h"
#include "wait.h"
#define USB_GETSTATUS_REMOTE_WAKEUP_ENABLED (2U)
/* -------------------------
* TMK host driver defs
* -------------------------
@ -191,7 +193,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);
}