embassy-usb-synopsys-otg

Crates

git

Versions

default

Flavors

Skip to main content

Endpoint

Struct Endpoint 

Source
pub struct Endpoint<'d, D, M = CriticalSectionRawMutex, DMA: DmaMode = Pio>
where M: SharedRawMutex,
{ /* private fields */ }
Expand description

USB endpoint.

Trait Implementations§

Source§

impl<'d, M, DMA> Endpoint for Endpoint<'d, In, M, DMA>
where M: SharedRawMutex, DMA: DmaMode,

Source§

fn info(&self) -> EndpointInfo

Get the endpoint address and attributes.
Source§

async fn wait_enabled(&mut self)

Wait for the endpoint to be enabled. Read more
Source§

fn is_enabled(&self) -> bool

Get whether the endpoint is enabled.
Source§

async fn set_stalled(&mut self, stalled: bool)

Set or clear the STALL handshake on this endpoint. Read more
Source§

fn is_stalled(&self) -> bool

Get whether the STALL handshake is set on this endpoint. Read more
Source§

impl<'d, M, DMA> Endpoint for Endpoint<'d, Out, M, DMA>
where M: SharedRawMutex, DMA: DmaMode,

Source§

fn info(&self) -> EndpointInfo

Get the endpoint address and attributes.
Source§

async fn wait_enabled(&mut self)

Wait for the endpoint to be enabled. Read more
Source§

fn is_enabled(&self) -> bool

Get whether the endpoint is enabled.
Source§

async fn set_stalled(&mut self, stalled: bool)

Set or clear the STALL handshake on this endpoint. Read more
Source§

fn is_stalled(&self) -> bool

Get whether the STALL handshake is set on this endpoint. Read more
Source§

impl<'d, M, DMA> EndpointIn for Endpoint<'d, In, M, DMA>
where M: SharedRawMutex, DMA: DmaMode,

Source§

async fn write_transfer( &mut self, buf: &[u8], needs_zlp: bool, ) -> Result<(), EndpointError>

Write all the data from buf to the endpoint as a transfer. Read more
Source§

impl<'d, M, DMA> EndpointOut for Endpoint<'d, Out, M, DMA>
where M: SharedRawMutex, DMA: DmaMode,

Source§

async fn read_transfer( &mut self, buf: &mut [u8], ) -> Result<usize, EndpointError>

Read a transfer from the host into buf, returning the number of bytes received. Read more

Auto Trait Implementations§

§

impl<'d, D, M = CriticalSectionRawMutex, DMA = Pio> !RefUnwindSafe for Endpoint<'d, D, M, DMA>

§

impl<'d, D, M = CriticalSectionRawMutex, DMA = Pio> !UnwindSafe for Endpoint<'d, D, M, DMA>

§

impl<'d, D, M, DMA> Forget for Endpoint<'d, D, M, DMA>

§

impl<'d, D, M, DMA> Freeze for Endpoint<'d, D, M, DMA>
where PhantomData<D>: Freeze, <DMA as DmaMode>::EndpointData<'d>: Freeze, M: Freeze,

§

impl<'d, D, M, DMA> Move for Endpoint<'d, D, M, DMA>

§

impl<'d, D, M, DMA> Send for Endpoint<'d, D, M, DMA>
where PhantomData<D>: Send, <DMA as DmaMode>::EndpointData<'d>: Send, M: Send,

§

impl<'d, D, M, DMA> Sync for Endpoint<'d, D, M, DMA>
where PhantomData<D>: Sync, <DMA as DmaMode>::EndpointData<'d>: Sync, M: Sync,

§

impl<'d, D, M, DMA> Unpin for Endpoint<'d, D, M, DMA>
where PhantomData<D>: Unpin, <DMA as DmaMode>::EndpointData<'d>: Unpin, M: Unpin,

§

impl<'d, D, M, DMA> UnsafeUnpin for Endpoint<'d, D, M, DMA>
where PhantomData<D>: UnsafeUnpin, <DMA as DmaMode>::EndpointData<'d>: UnsafeUnpin, M: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.