pub struct Endpoint<'d, T: Instance, D> { /* private fields */ }
Expand description
USB endpoint.
Trait Implementations§
Source§impl<'d, T: Instance> Endpoint for Endpoint<'d, T, In>
impl<'d, T: Instance> Endpoint for Endpoint<'d, T, In>
Source§fn info(&self) -> &EndpointInfo
fn info(&self) -> &EndpointInfo
Get the endpoint address
Source§async fn wait_enabled(&mut self)
async fn wait_enabled(&mut self)
Wait for the endpoint to be enabled.
Source§impl<'d, T: Instance> Endpoint for Endpoint<'d, T, Out>
impl<'d, T: Instance> Endpoint for Endpoint<'d, T, Out>
Source§fn info(&self) -> &EndpointInfo
fn info(&self) -> &EndpointInfo
Get the endpoint address
Source§async fn wait_enabled(&mut self)
async fn wait_enabled(&mut self)
Wait for the endpoint to be enabled.
Source§impl<'d, T: Instance> EndpointIn for Endpoint<'d, T, In>
impl<'d, T: Instance> EndpointIn for Endpoint<'d, T, In>
Source§async fn write(&mut self, buf: &[u8]) -> Result<(), EndpointError>
async fn write(&mut self, buf: &[u8]) -> Result<(), EndpointError>
Write a single packet of data to the endpoint.
Source§async fn write_transfer(
&mut self,
buf: &[u8],
needs_zlp: bool,
) -> Result<(), EndpointError>
async fn write_transfer( &mut self, buf: &[u8], needs_zlp: bool, ) -> Result<(), EndpointError>
Write all the data from buf to the endpoint one wMaxPacketSize chunk at a time. Read more
Source§impl<'d, T: Instance> EndpointOut for Endpoint<'d, T, Out>
impl<'d, T: Instance> EndpointOut for Endpoint<'d, T, Out>
Source§async fn read(&mut self, buf: &mut [u8]) -> Result<usize, EndpointError>
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, EndpointError>
Read a single packet of data from the endpoint, and return the actual length of
the packet. Read more
Source§async fn read_transfer(
&mut self,
buf: &mut [u8],
) -> Result<usize, EndpointError>
async fn read_transfer( &mut self, buf: &mut [u8], ) -> Result<usize, EndpointError>
Read until the buffer is full or we receive a short packet from the USB host returning the
actual length of the entire data block. Read more
Auto Trait Implementations§
impl<'d, T, D> Freeze for Endpoint<'d, T, D>
impl<'d, T, D> RefUnwindSafe for Endpoint<'d, T, D>where
D: RefUnwindSafe,
T: RefUnwindSafe,
impl<'d, T, D> Send for Endpoint<'d, T, D>
impl<'d, T, D> Sync for Endpoint<'d, T, D>
impl<'d, T, D> Unpin for Endpoint<'d, T, D>
impl<'d, T, D> !UnwindSafe for Endpoint<'d, T, D>
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