mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 06:42:32 +00:00
usb: log on reset, resume, suspend
This commit is contained in:
parent
522a87ae42
commit
8fe3b44d82
@ -112,6 +112,7 @@ impl<'d, D: Driver<'d>> UsbDevice<'d, D> {
|
|||||||
match select(bus_fut, control_fut).await {
|
match select(bus_fut, control_fut).await {
|
||||||
Either::Left(evt) => match evt {
|
Either::Left(evt) => match evt {
|
||||||
Event::Reset => {
|
Event::Reset => {
|
||||||
|
trace!("usb: reset");
|
||||||
self.bus.reset();
|
self.bus.reset();
|
||||||
|
|
||||||
self.device_state = UsbDeviceState::Default;
|
self.device_state = UsbDeviceState::Default;
|
||||||
@ -122,8 +123,11 @@ impl<'d, D: Driver<'d>> UsbDevice<'d, D> {
|
|||||||
h.reset();
|
h.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Event::Resume => {}
|
Event::Resume => {
|
||||||
|
trace!("usb: resume");
|
||||||
|
}
|
||||||
Event::Suspend => {
|
Event::Suspend => {
|
||||||
|
trace!("usb: suspend");
|
||||||
self.bus.suspend();
|
self.bus.suspend();
|
||||||
self.device_state = UsbDeviceState::Suspend;
|
self.device_state = UsbDeviceState::Suspend;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user