revert feat(api): add plug_in_detection
This commit is contained in:
doryan 2025-04-28 18:49:26 +03:00
parent fb6f180ce2
commit 79d01f8571

View File

@ -98,10 +98,7 @@ impl<const L: usize> UsbDevice<L> {
UsbBusAllocator::new(self)
}
#[inline(always)]
pub fn plug_in_detect(&self, cs: CriticalSection<'_>) -> bool {
self.usb.borrow(cs).usbsta.read().vbus().bit_is_set()
}
#[inline]
#[inline(always)]
pub(crate) fn allocated_endpoints(&self) -> impl Iterator<Item = (usize, &USBEndpoint)> {