embassy-stm32

Crates

git

Versions

stm32g0b0ve

Flavors

Channel

Struct Channel 

Source
pub struct Channel<'d, I: Instance, D: Direction, T: Type> { /* private fields */ }
Expand description

USB endpoint. Only implements single buffer mode.

Implementations§

Source§

impl<'d, I: Instance, D: Direction, T: Type> Channel<'d, I, D, T>

Source

pub fn activate_rx(&mut self)

Source

pub fn activate_tx(&mut self)

Source

pub fn disable_rx(&mut self)

Trait Implementations§

Source§

impl<'d, I: Instance, T: Type, D: Direction> Drop for Channel<'d, I, D, T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'d, I: Instance, T: Type, D: Direction> UsbChannel<T, D> for Channel<'d, I, D, T>

Source§

async fn control_in( &mut self, setup: &SetupPacket, buf: &mut [u8], ) -> Result<usize, ChannelError>
where T: IsControl, D: IsIn,

Send IN control request. Read more
Source§

async fn control_out( &mut self, setup: &SetupPacket, buf: &[u8], ) -> Result<(), ChannelError>
where T: IsControl, D: IsOut,

Send OUT control request
Source§

fn retarget_channel( &mut self, addr: u8, endpoint: &EndpointInfo, _pre: bool, ) -> Result<(), HostError>

Retargets channel to a new endpoint, may error if the underlying driver runs out of resources
Source§

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

Send IN request of type other from control For interrupt channels 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<(), ChannelError>
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, _: TimeoutConfig)

Configure the timeouts of this channel.

Auto Trait Implementations§

§

impl<'d, I, D, T> Freeze for Channel<'d, I, D, T>

§

impl<'d, I, D, T> RefUnwindSafe for Channel<'d, I, D, T>

§

impl<'d, I, D, T> Send for Channel<'d, I, D, T>
where D: Send, T: Send, I: Send,

§

impl<'d, I, D, T> Sync for Channel<'d, I, D, T>
where D: Sync, T: Sync, I: Sync,

§

impl<'d, I, D, T> Unpin for Channel<'d, I, D, T>
where D: Unpin, T: Unpin, I: Unpin,

§

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

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 = Infallible

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.