Add logging from usb-4-solution.rs

This commit is contained in:
Rafael Bachmann 2020-10-18 19:06:13 +02:00 committed by GitHub
parent dfb8685d73
commit b67660a753
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,9 +48,15 @@ fn on_event(usbd: &USBD, ep0in: &mut Ep0In, state: &mut State, event: Event) {
match event {
// TODO change `state` as specified in chapter 9.1 USB Device States, of the USB specification
Event::UsbReset => todo!(),
Event::UsbReset => {
log::info!("USB reset condition detected");
todo!();
}
Event::UsbEp0DataDone => ep0in.end(usbd),
Event::UsbEp0DataDone => {
log::info!("EP0IN: transfer complete");
ep0in.end(usbd);
}
Event::UsbEp0Setup => {
if ep0setup(usbd, ep0in, state).is_err() {