embassy-usb

Crates

git

Versions

default

Flavors

Skip to main content

IoBox

Struct IoBox 

Source
pub struct IoBox<'d, D: Driver<'d>, const N: usize> {
    pub line_out: LineOutStream<'d, D>,
    pub line_in: LineInStream<'d, D>,
    pub feedback: Feedback<'d, D>,
    pub interrupt: Option<Interrupt<'d, D, N>>,
    pub control_monitor: ControlMonitor<'d, N>,
}
Expand description

USB Audio Class 2.0 I/O box: line out + line in with explicit feedback.

Fields§

§line_out: LineOutStream<'d, D>

Line out stream (host to device).

§line_in: LineInStream<'d, D>

Line in stream (device to host).

§feedback: Feedback<'d, D>

Line out’s explicit feedback endpoint.

§interrupt: Option<Interrupt<'d, D, N>>

The AudioControl interrupt endpoint, if Config::interrupt_endpoint is set.

§control_monitor: ControlMonitor<'d, N>

Control monitor.

Implementations§

Source§

impl<'d, D: Driver<'d>, const N: usize> IoBox<'d, D, N>

Source

pub fn new( builder: &mut Builder<'d, D>, state: &'d mut State<'d, N>, config: Config<'d, N>, ) -> Self

Creates a new IoBox function.

§Panics

If there is no sample rate or more than ten, no channel in a direction, a direction whose packets (max_packet_size) exceed the isochronous limit (1023 bytes at full speed, 1024 at high speed), a nonempty feature unit without one entry for the master and each channel, or with more than 62, unsupported control bits, or a control_buf too small for the sample rate list.

Auto Trait Implementations§

§

impl<'d, D, const N: usize> !RefUnwindSafe for IoBox<'d, D, N>

§

impl<'d, D, const N: usize> !UnwindSafe for IoBox<'d, D, N>

§

impl<'d, D, const N: usize> Forget for IoBox<'d, D, N>

§

impl<'d, D, const N: usize> Freeze for IoBox<'d, D, N>
where LineOutStream<'d, D>: Freeze, LineInStream<'d, D>: Freeze, Feedback<'d, D>: Freeze, Option<Interrupt<'d, D, N>>: Freeze, ControlMonitor<'d, N>: Freeze,

§

impl<'d, D, const N: usize> Move for IoBox<'d, D, N>

§

impl<'d, D, const N: usize> Send for IoBox<'d, D, N>
where LineOutStream<'d, D>: Send, LineInStream<'d, D>: Send, Feedback<'d, D>: Send, Option<Interrupt<'d, D, N>>: Send, ControlMonitor<'d, N>: Send,

§

impl<'d, D, const N: usize> Sync for IoBox<'d, D, N>
where LineOutStream<'d, D>: Sync, LineInStream<'d, D>: Sync, Feedback<'d, D>: Sync, Option<Interrupt<'d, D, N>>: Sync, ControlMonitor<'d, N>: Sync,

§

impl<'d, D, const N: usize> Unpin for IoBox<'d, D, N>
where LineOutStream<'d, D>: Unpin, LineInStream<'d, D>: Unpin, Feedback<'d, D>: Unpin, Option<Interrupt<'d, D, N>>: Unpin, ControlMonitor<'d, N>: Unpin,

§

impl<'d, D, const N: usize> UnsafeUnpin for IoBox<'d, D, N>

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.