feat(usb_device): add getters
This commit is contained in:
parent
ce10b959e4
commit
4a90b9a6c8
|
@ -93,6 +93,16 @@ impl<const L: usize> UsbDevice<L> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
|
pub fn get_usb_device<'u>(&'u self, cs: CriticalSection<'u>) -> &'u USB_DEVICE {
|
||||||
|
self.usb.borrow(cs)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
|
pub fn get_pll<'u>(&'u self, cs: CriticalSection<'u>) -> &'u PLL {
|
||||||
|
self.pll.borrow(cs)
|
||||||
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub(crate) fn allocated_endpoints(&self) -> impl Iterator<Item = (usize, &USBEndpoint)> {
|
pub(crate) fn allocated_endpoints(&self) -> impl Iterator<Item = (usize, &USBEndpoint)> {
|
||||||
self.ep_table
|
self.ep_table
|
||||||
|
|
Loading…
Reference in New Issue