mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-10 16:25:37 +00:00
commit
5502aff6dd
2 changed files with 4 additions and 0 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 { .. } => {
|
||||
|
|
Loading…
Reference in a new issue