Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tide75/linker/wireless/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,21 @@ void usb_remote_wakeup(void) {
}
#else
static uint32_t suspend_timer = 0x00;
static bool suspended = false;

if ((USB_DRIVER.state == USB_SUSPENDED)) {
if (!suspend_timer) suspend_timer = sync_timer_read32();
if (sync_timer_elapsed32(suspend_timer) >= USB_POWER_DOWN_DELAY) {
suspend_timer = 0x00;
suspended = true;
suspend_power_down();
}
} else {
suspend_timer = 0x00;
if (suspended) {
suspended = false;
suspend_wakeup_init();
}
}
#endif
}
Expand Down