usbd-human-interface-device icon indicating copy to clipboard operation
usbd-human-interface-device copied to clipboard

Is anything required to support remote wakeup?

Open dlkj opened this issue 2 years ago • 3 comments

Anything more required other than setting UsbDeviceBuilder::supports_remote_wakeup(true)?

dlkj avatar Jan 10 '22 09:01 dlkj

Yes, will require implementing suspended and resume in rp2040-hal::usb and exposing remote wakeup in usb-device

dlkj avatar Jan 19 '22 16:01 dlkj

This does the trick: https://github.com/rp-rs/rp-hal/pull/406

ithinuel avatar Jul 30 '22 20:07 ithinuel

Anything more required other than setting UsbDeviceBuilder::supports_remote_wakeup(true)?

This just tells the host that the device supports remote wakeup. Then the host will "arm" remote wakeup which you can check with UsbDevice::remote_wakeup_enabled(). And finally, as @ithinuel mentioned you'll have to check your wakeup condition, that the device is in USB suspend, remote wakeup is enabled and then call the MCU specific API to actually wake the device/bus again.

JohnAZoidberg avatar Oct 03 '23 09:10 JohnAZoidberg