embassy-nrf

Crates

git

Versions

nrf5340-app-s

Flavors

Skip to main content

Endpoint

Struct Endpoint 

Source
pub struct Endpoint<'d, Dir> { /* private fields */ }
Expand description

USB endpoint.

Implementations§

Source§

impl<'d, Dir: EndpointDir> Endpoint<'d, Dir>

Source

pub fn wait_disabled(&mut self) -> impl Future<Output = ()> + use<'_, 'd, Dir>

Wait for the endpoint to be disabled

Trait Implementations§

Source§

impl<'d, Dir: EndpointDir> Endpoint for Endpoint<'d, Dir>

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> EndpointIn for Endpoint<'d, In>

Source§

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

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

impl<'d> EndpointOut for Endpoint<'d, Out>

Source§

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
Source§

impl<'d> IsoEndpointIn for Endpoint<'d, In>

Source§

type Slot<'a> = IsoSlot<'a, 'd>
where Self: 'a,

A reserved slot borrowing this endpoint.
Source§

fn queue_depth(&self) -> u8

How many packets may be committed ahead of the one the host collects next. Read more
Source§

async fn ready(&mut self) -> Result<Self::Slot<'_>, EndpointDisabledError>

Wait until the next packet can be queued, returning a reserved slot for its service interval. Read more

Auto Trait Implementations§

§

impl<'d, Dir> Forget for Endpoint<'d, Dir>

§

impl<'d, Dir> Freeze for Endpoint<'d, Dir>
where PhantomData<(&'d (), Dir)>: Freeze,

§

impl<'d, Dir> Move for Endpoint<'d, Dir>

§

impl<'d, Dir> RefUnwindSafe for Endpoint<'d, Dir>
where PhantomData<(&'d (), Dir)>: RefUnwindSafe,

§

impl<'d, Dir> Send for Endpoint<'d, Dir>
where PhantomData<(&'d (), Dir)>: Send,

§

impl<'d, Dir> Sync for Endpoint<'d, Dir>
where PhantomData<(&'d (), Dir)>: Sync,

§

impl<'d, Dir> Unpin for Endpoint<'d, Dir>
where PhantomData<(&'d (), Dir)>: Unpin,

§

impl<'d, Dir> UnsafeUnpin for Endpoint<'d, Dir>
where PhantomData<(&'d (), Dir)>: UnsafeUnpin,

§

impl<'d, Dir> UnwindSafe for Endpoint<'d, Dir>
where PhantomData<(&'d (), Dir)>: UnwindSafe,

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.