feat: USBEndpoint is public
This commit is contained in:
parent
3ddf928152
commit
ca85ac552d
|
@ -8,7 +8,7 @@ use usb_device::{bus::UsbBusAllocator, endpoint::EndpointType, UsbDirection, Usb
|
||||||
|
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
#[derive(Default, Copy, Clone)]
|
#[derive(Default, Copy, Clone)]
|
||||||
pub(crate) struct USBEndpoint {
|
pub struct USBEndpoint {
|
||||||
pub(crate) is_allocated: bool,
|
pub(crate) is_allocated: bool,
|
||||||
pub(crate) size: u8,
|
pub(crate) size: u8,
|
||||||
pub(crate) ep_type: u8,
|
pub(crate) ep_type: u8,
|
||||||
|
@ -111,6 +111,10 @@ impl<const L: usize> UsbDevice<L> {
|
||||||
.filter(|&(_, ep)| ep.is_allocated)
|
.filter(|&(_, ep)| ep.is_allocated)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn get_endpoints(&self) -> &[USBEndpoint] {
|
||||||
|
&self.ep_table
|
||||||
|
}
|
||||||
|
|
||||||
pub(crate) fn select_endpoint(
|
pub(crate) fn select_endpoint(
|
||||||
&self,
|
&self,
|
||||||
cs: CriticalSection<'_>,
|
cs: CriticalSection<'_>,
|
||||||
|
|
Loading…
Reference in New Issue