Struct imxrt_hal::usbd::EndpointMemory
source · pub struct EndpointMemory<const SIZE: usize> { /* private fields */ }
Expand description
Memory for endpoint I/O.
This allocates SIZE
total bytes. The memory is then allocated for endpoints based
on the need of each class.
Allocate this in a static, and supply it to your driver. Construction panics if the endpoint memory has already been assigned to another USB driver.
use imxrt_usbd::EndpointMemory;
static EP_MEMORY: EndpointMemory<4096> = EndpointMemory::new();
Implementations§
source§impl<const SIZE: usize> EndpointMemory<SIZE>
impl<const SIZE: usize> EndpointMemory<SIZE>
sourcepub const fn new() -> EndpointMemory<SIZE>
pub const fn new() -> EndpointMemory<SIZE>
Allocate endpoint memory.
Trait Implementations§
impl<const SIZE: usize> Sync for EndpointMemory<SIZE>
Auto Trait Implementations§
impl<const SIZE: usize> !RefUnwindSafe for EndpointMemory<SIZE>
impl<const SIZE: usize> Send for EndpointMemory<SIZE>
impl<const SIZE: usize> Unpin for EndpointMemory<SIZE>
impl<const SIZE: usize> UnwindSafe for EndpointMemory<SIZE>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more