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,
) -> StdConfig
pub fn new( channel_cfg: Config, clk_cfg: StdClkConfig, slot_cfg: StdSlotConfig, gpio_cfg: StdGpioConfig, ) -> StdConfig
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) -> StdConfig
pub fn philips(sample_rate_hz: u32, bits_per_sample: DataBitWidth) -> StdConfig
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) -> StdConfig
pub fn pcm(sample_rate_hz: u32, bits_per_sample: DataBitWidth) -> StdConfig
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) -> StdConfig
pub fn msb(sample_rate_hz: u32, bits_per_sample: DataBitWidth) -> StdConfig
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.