Struct esp32_hal::i2s::I2s

source ·
pub struct I2s<'d, I, CH>{
    pub i2s_tx: TxCreator<'d, I, CH>,
    pub i2s_rx: RxCreator<'d, I, CH>,
}
Expand description

Instance of the I2S peripheral driver

Fields§

§i2s_tx: TxCreator<'d, I, CH>§i2s_rx: RxCreator<'d, I, CH>

Implementations§

source§

impl<'d, I, CH> I2s<'d, I, CH>

source

pub fn new( i2s: impl Peripheral<P = I> + 'd, standard: Standard, data_format: DataFormat, sample_rate: impl Into<Rate<u32, 1, 1>>, channel: Channel<'d, CH>, clocks: &Clocks<'_> ) -> I2s<'d, I, CH>
where I: I2s0Instance, <CH as ChannelTypes>::P: I2sPeripheral + I2s0Peripheral,

Construct a new I2S peripheral driver instance for the first I2S peripheral

source

pub fn new_i2s1( i2s: impl Peripheral<P = I> + 'd, standard: Standard, data_format: DataFormat, sample_rate: impl Into<Rate<u32, 1, 1>>, channel: Channel<'d, CH>, clocks: &Clocks<'_> ) -> I2s<'d, I, CH>
where I: I2s1Instance, <CH as ChannelTypes>::P: I2sPeripheral + I2s1Peripheral,

Construct a new I2S peripheral driver instance for the second I2S peripheral

source

pub fn with_mclk<P>(self, pin: impl Peripheral<P = P> + 'd) -> I2s<'d, I, CH>
where P: OutputPin,

Auto Trait Implementations§

§

impl<'d, I, CH> RefUnwindSafe for I2s<'d, I, CH>
where I: RefUnwindSafe, <CH as ChannelTypes>::Rx<'d>: RefUnwindSafe, <CH as ChannelTypes>::Tx<'d>: RefUnwindSafe,

§

impl<'d, I, CH> Send for I2s<'d, I, CH>
where I: Send, <CH as ChannelTypes>::Rx<'d>: Send, <CH as ChannelTypes>::Tx<'d>: Send,

§

impl<'d, I, CH> Sync for I2s<'d, I, CH>
where I: Sync, <CH as ChannelTypes>::Rx<'d>: Sync, <CH as ChannelTypes>::Tx<'d>: Sync,

§

impl<'d, I, CH> Unpin for I2s<'d, I, CH>
where I: Unpin, <CH as ChannelTypes>::Rx<'d>: Unpin, <CH as ChannelTypes>::Tx<'d>: Unpin,

§

impl<'d, I, CH> UnwindSafe for I2s<'d, I, CH>
where I: UnwindSafe, <CH as ChannelTypes>::Rx<'d>: UnwindSafe, <CH as ChannelTypes>::Tx<'d>: 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>,

§

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>,

§

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.