embassy-rp

Crates

git

Versions

rp2040

Flavors

Skip to main content

Channel

Struct Channel 

Source
pub struct Channel<'d, T: SealedHostInstance, E, D> { /* private fields */ }
Expand description

USB endpoint.

Trait Implementations§

Source§

impl<'d, T: Debug + SealedHostInstance, E: Debug, D: Debug> Debug for Channel<'d, T, E, D>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'d, T: SealedHostInstance, E, D> Drop for Channel<'d, T, E, D>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl<'d, T: SealedHostInstance, E, D> Format for Channel<'d, T, E, D>
where PhantomData<(&'d mut T, E, D)>: Format, EndpointBuffer<T>: Format, TimeoutConfig: Format, Option<u64>: Format,

Source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.
Source§

impl<'d, T: SealedHostInstance, E: Type, D: Direction> UsbPipe<E, D> for Channel<'d, T, E, D>

Source§

async fn control_in( &mut self, setup: &[u8; 8], buf: &mut [u8], ) -> Result<usize, PipeError>
where E: IsControl, D: IsIn,

Send IN control request. Read more
Source§

async fn control_out( &mut self, setup: &[u8; 8], buf: &[u8], ) -> Result<(), PipeError>
where E: IsControl, D: IsOut,

Send OUT control request
Source§

async fn request_in(&mut self, buf: &mut [u8]) -> Result<usize, PipeError>
where D: IsIn,

Send IN request of type other from control For interrupt pipes this will return the result of the next successful interrupt poll
Source§

async fn request_out( &mut self, buf: &[u8], ensure_transaction_end: bool, ) -> Result<(), PipeError>
where D: IsOut,

Send OUT request of type other from control ensure_transaction_end: Send a zero length packet at the end of transaction if last packet is of max size.
Source§

fn set_timeout(&mut self, timeout: TimeoutConfig)

Configure the timeouts of this pipe.
Source§

fn reset_data_toggle(&mut self)

Reset the host-side data toggle on this pipe to DATA0. Read more

Auto Trait Implementations§

§

impl<'d, T, E, D> !UnwindSafe for Channel<'d, T, E, D>

§

impl<'d, T, E, D> Freeze for Channel<'d, T, E, D>
where PhantomData<(&'d mut T, E, D)>: Freeze, EndpointBuffer<T>: Freeze,

§

impl<'d, T, E, D> RefUnwindSafe for Channel<'d, T, E, D>
where PhantomData<(&'d mut T, E, D)>: RefUnwindSafe, EndpointBuffer<T>: RefUnwindSafe,

§

impl<'d, T, E, D> Send for Channel<'d, T, E, D>
where PhantomData<(&'d mut T, E, D)>: Send, EndpointBuffer<T>: Send,

§

impl<'d, T, E, D> Sync for Channel<'d, T, E, D>
where PhantomData<(&'d mut T, E, D)>: Sync, EndpointBuffer<T>: Sync,

§

impl<'d, T, E, D> Unpin for Channel<'d, T, E, D>
where PhantomData<(&'d mut T, E, D)>: Unpin, EndpointBuffer<T>: Unpin,

§

impl<'d, T, E, D> UnsafeUnpin for Channel<'d, T, E, D>
where PhantomData<(&'d mut T, E, D)>: UnsafeUnpin, EndpointBuffer<T>: 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, <T as TryFrom<U>>::Error>

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.