pub struct Endpoint<'d, T, D, const SIZE: usize> { /* private fields */ }Expand description
USB endpoint.
Trait Implementations§
Source§impl<'d, T: Instance, D: Dir, const SIZE: usize> Endpoint for Endpoint<'d, T, D, SIZE>
impl<'d, T: Instance, D: Dir, const SIZE: usize> Endpoint for Endpoint<'d, T, D, SIZE>
Source§async fn wait_enabled(&mut self)
async fn wait_enabled(&mut self)
Wait for the endpoint to be enabled.
Source§fn set_stall(&mut self, stalled: bool) -> Result<(), Unsupported>
fn set_stall(&mut self, stalled: bool) -> Result<(), Unsupported>
Set or clear the STALL handshake on this endpoint. Read more
Source§fn is_stalled(&self) -> Result<bool, Unsupported>
fn is_stalled(&self) -> Result<bool, Unsupported>
Get whether the STALL handshake is set on this endpoint. Read more
Source§impl<'d, T: Instance, const SIZE: usize> EndpointIn for Endpoint<'d, T, In, SIZE>
impl<'d, T: Instance, const SIZE: usize> EndpointIn for Endpoint<'d, T, In, SIZE>
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.
§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, const SIZE: usize> EndpointOut for Endpoint<'d, T, Out, SIZE>
impl<'d, T: Instance, const SIZE: usize> EndpointOut for Endpoint<'d, T, Out, SIZE>
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
§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