We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a03fc7a commit 1cfc55cCopy full SHA for 1cfc55c
mod.rs
@@ -563,7 +563,15 @@ impl UsbBus for Usbd<'_> {
563
}
564
565
fn is_stalled(&self, ep_addr: EndpointAddress) -> bool {
566
- unimplemented!("is_stalled(ep={:?})", ep_addr);
+ interrupt::free(|cs| {
567
+ let regs = self.periph.borrow(cs);
568
+
569
+ let i = ep_addr.index();
570
+ match ep_addr.direction() {
571
+ UsbDirection::Out => regs.halted.epout[i].read().getstatus().is_halted(),
572
+ UsbDirection::In => regs.halted.epin[i].read().getstatus().is_halted(),
573
+ }
574
+ })
575
576
577
#[inline]
0 commit comments