usb: centralize all control logging in control.rs

This commit is contained in:
Dario Nieuwenhuis
2022-04-02 04:53:42 +02:00
parent d7d199f2ac
commit 522a87ae42
3 changed files with 17 additions and 13 deletions

View File

@ -128,14 +128,10 @@ impl<'d, D: Driver<'d>> UsbDevice<'d, D> {
self.device_state = UsbDeviceState::Suspend;
}
},
Either::Right(req) => {
debug!("control request: {:x}", req);
match req {
Setup::DataIn(req, stage) => self.handle_control_in(req, stage).await,
Setup::DataOut(req, stage) => self.handle_control_out(req, stage).await,
}
}
Either::Right(req) => match req {
Setup::DataIn(req, stage) => self.handle_control_in(req, stage).await,
Setup::DataOut(req, stage) => self.handle_control_out(req, stage).await,
},
}
}
}