feat: USBEndpoint is public

This commit is contained in:
doryan 2025-06-29 21:32:37 +04:00
parent 3ddf928152
commit ca85ac552d

View File

@ -8,7 +8,7 @@ use usb_device::{bus::UsbBusAllocator, endpoint::EndpointType, UsbDirection, Usb
#[allow(unused)]
#[derive(Default, Copy, Clone)]
pub(crate) struct USBEndpoint {
pub struct USBEndpoint {
pub(crate) is_allocated: bool,
pub(crate) size: u8,
pub(crate) ep_type: u8,
@ -111,6 +111,10 @@ impl<const L: usize> UsbDevice<L> {
.filter(|&(_, ep)| ep.is_allocated)
}
pub fn get_endpoints(&self) -> &[USBEndpoint] {
&self.ep_table
}
pub(crate) fn select_endpoint(
&self,
cs: CriticalSection<'_>,