feat: make USBEndpoint public + add method get_ep_table

This commit is contained in:
doryan 2025-06-30 21:08:09 +04:00
parent 16e254d7dc
commit a800e28303

View File

@ -6,7 +6,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,
@ -132,6 +132,10 @@ impl<const L: usize> UsbDevice<L> {
Ok(())
}
pub fn get_ep_table(&self) -> &[USBEndpoint] {
&self.ep_table
}
pub(crate) fn configure_endpoint(
&self,
cs: CriticalSection<'_>,