Struct esp_idf_hal::i2s::config::StdConfig
source · pub struct StdConfig { /* private fields */ }
Expand description
Standard mode configuration for the I2S peripheral.
Implementations§
source§impl StdConfig
impl StdConfig
sourcepub fn new(
channel_cfg: Config,
clk_cfg: StdClkConfig,
slot_cfg: StdSlotConfig,
gpio_cfg: StdGpioConfig,
) -> Self
pub fn new( channel_cfg: Config, clk_cfg: StdClkConfig, slot_cfg: StdSlotConfig, gpio_cfg: StdGpioConfig, ) -> Self
Create a new standard mode channel configuration from the given clock configuration, slot configuration, and GPIO configuration.
sourcepub fn philips(sample_rate_hz: u32, bits_per_sample: DataBitWidth) -> Self
pub fn philips(sample_rate_hz: u32, bits_per_sample: DataBitWidth) -> Self
Create a new standard mode channel configuration for the Philips I2S protocol with the specified sample rate and bits per sample, in stereo mode, with MCLK set to 256 times the sample rate.
sourcepub fn pcm(sample_rate_hz: u32, bits_per_sample: DataBitWidth) -> Self
pub fn pcm(sample_rate_hz: u32, bits_per_sample: DataBitWidth) -> Self
Create a new standard mode channel configuration for the PCM I2S protocol with the specified sample rate and bits per sample, in stereo mode, with MCLK set to 256 times the sample rate.
sourcepub fn msb(sample_rate_hz: u32, bits_per_sample: DataBitWidth) -> Self
pub fn msb(sample_rate_hz: u32, bits_per_sample: DataBitWidth) -> Self
Create a new standard mode channel configuration for the MSB I2S protocol with the specified sample rate and bits per sample, in stereo mode, with MCLK set to 256 times the sample rate.