Struct esp_idf_svc::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();