Merge pull request #2361 from lights0123/patch-1
stm32: USB IN endpoints use IN wakers
This commit is contained in:
commit
00f77c4a92
1 changed files with 3 additions and 3 deletions
|
@ -701,10 +701,10 @@ impl<'d, T: Instance> driver::Endpoint for Endpoint<'d, T, In> {
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn wait_enabled(&mut self) {
|
async fn wait_enabled(&mut self) {
|
||||||
trace!("wait_enabled OUT WAITING");
|
trace!("wait_enabled IN WAITING");
|
||||||
let index = self.info.addr.index();
|
let index = self.info.addr.index();
|
||||||
poll_fn(|cx| {
|
poll_fn(|cx| {
|
||||||
EP_OUT_WAKERS[index].register(cx.waker());
|
EP_IN_WAKERS[index].register(cx.waker());
|
||||||
let regs = T::regs();
|
let regs = T::regs();
|
||||||
if regs.epr(index).read().stat_tx() == Stat::DISABLED {
|
if regs.epr(index).read().stat_tx() == Stat::DISABLED {
|
||||||
Poll::Pending
|
Poll::Pending
|
||||||
|
@ -713,7 +713,7 @@ impl<'d, T: Instance> driver::Endpoint for Endpoint<'d, T, In> {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
trace!("wait_enabled OUT OK");
|
trace!("wait_enabled IN OK");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue