Merge pull request #180 from ferrous-systems/fixes

some fixes!
This commit is contained in:
Anatol Ulrich 2021-09-03 15:19:08 +02:00 committed by GitHub
commit 5502aff6dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -46,6 +46,7 @@ fn on_event(_usbd: &USBD, event: Event) {
// leave this at it is for now.
Event::UsbEp0Setup => {
log::info!("goal reached; move to the next section");
dk::exit()
}
}
}

View file

@ -76,6 +76,9 @@ fn on_event(usbd: &USBD, ep0in: &mut Ep0In, event: Event) {
// TODO send back a valid device descriptor, truncated to `length` bytes
// let desc = usb2::device::Descriptor { .. };
let resp = [];
// ensure we're not overstepping boundaries
assert!(resp.len() <= length as usize);
ep0in.start(&resp, usbd);
}
Request::SetAddress { .. } => {