Merge pull request #2361 from lights0123/patch-1

stm32: USB IN endpoints use IN wakers
This commit is contained in:
Dario Nieuwenhuis 2023-12-26 23:27:37 +00:00 committed by GitHub
commit 00f77c4a92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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");
} }
} }