Refactor embassy-usb address handling to allow reordering of status resoponse

This commit is contained in:
chemicstry
2023-01-11 17:47:12 +01:00
committed by Dario Nieuwenhuis
parent 96b97c4711
commit ce842fe28c
5 changed files with 44 additions and 38 deletions

View File

@ -391,11 +391,6 @@ impl<'d, T: Instance, P: UsbSupply> driver::Bus for Bus<'d, T, P> {
.await
}
#[inline]
fn set_address(&mut self, _addr: u8) {
// Nothing to do, the peripheral handles this.
}
fn endpoint_set_stalled(&mut self, ep_addr: EndpointAddress, stalled: bool) {
let regs = T::regs();
unsafe {
@ -841,6 +836,11 @@ impl<'d, T: Instance> driver::ControlPipe for ControlPipe<'d, T> {
let regs = T::regs();
regs.tasks_ep0stall.write(|w| w.tasks_ep0stall().bit(true));
}
async fn accept_set_address(&mut self, _addr: u8) {
self.accept().await;
// Nothing to do, the peripheral handles this.
}
}
fn dma_start() {