Update usb.rs

- add check of `dev_resume_from_host` interrupt register to catch wake event
This commit is contained in:
djstrickland 2023-12-13 14:50:13 -05:00 committed by Dario Nieuwenhuis
parent fa6039c92b
commit 6181646314

View File

@ -363,7 +363,7 @@ impl<'d, T: Instance> driver::Bus for Bus<'d, T> {
let siestatus = regs.sie_status().read(); let siestatus = regs.sie_status().read();
let intrstatus = regs.intr().read(); let intrstatus = regs.intr().read();
if siestatus.resume() { if siestatus.resume() || intrstatus.dev_resume_from_host() {
regs.sie_status().write(|w| w.set_resume(true)); regs.sie_status().write(|w| w.set_resume(true));
return Poll::Ready(Event::Resume); return Poll::Ready(Event::Resume);
} }