Struct esp_idf_hal::i2s::I2sBiDir

source ·
pub struct I2sBiDir {}
Expand description

Concrete implementation of both I2sRxSupported and I2sTxSupported for use in clients.

Example usage:

use esp_idf_hal::i2s::{config::{StdConfig, DataBitWidth}, gpio::*, peripherals::Peripherals};
let std_config = StdConfig::philips(48000, DataBitWidth::Bits16);
let peripherals = Peripherals::take().unwrap();
let bclk = peripherals.pins.gpio1;
let din = peripherals.pins.gpio4;
let dout = peripherals.pins.gpio6;
let mclk = AnyIOPin::none();
let ws = peripherals.pins.gpio2;
let i2s = I2sDriver::<I2sBiDir>::new_std_bidir(peripherals.i2s0, &std_config, bclk, din, dout, mclk, ws).unwrap();

Trait Implementations§

Auto Trait Implementations§

§

impl RefUnwindSafe for I2sBiDir

§

impl Send for I2sBiDir

§

impl Sync for I2sBiDir

§

impl Unpin for I2sBiDir

§

impl UnwindSafe for I2sBiDir

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.