SaiConfig

Struct SaiConfig 

Source
pub struct SaiConfig {
Show 18 fields pub mclk_source: MclkSource, pub tx_fifo_wm: u32, pub tx_stop_en: bool, pub tx_debug_en: bool, pub tx_bclk_div: u32, pub rx_fifo_wm: u32, pub rx_stop_en: bool, pub rx_debug_en: bool, pub rx_bclk_div: u32, pub byte_order: ByteOrder, pub mode: Mode, pub sync_width: SyncWidth, pub sync_early: bool, pub sync_polarity: ClockPolarity, pub sync_mode: SyncMode, pub bclk_src_swap: bool, pub bclk_input_delay: bool, pub bclk_polarity: ClockPolarity,
}
Expand description

Configuration for SAI peripheral

Fields§

§mclk_source: MclkSource

MCLK source

§tx_fifo_wm: u32

TX fifo watermark

§tx_stop_en: bool

TX stop enable

§tx_debug_en: bool

TX debug enable

§tx_bclk_div: u32

TX BCLK divider

§rx_fifo_wm: u32

RX FIFO watermark

§rx_stop_en: bool

RX stop enable

§rx_debug_en: bool

RX debug enable

§rx_bclk_div: u32

RX BCLK divider

§byte_order: ByteOrder

Byte order

§mode: Mode

Mode

§sync_width: SyncWidth

Sync width

§sync_early: bool

Sync early

§sync_polarity: ClockPolarity

Sync polarity

§sync_mode: SyncMode

Sync mode

§bclk_src_swap: bool

BCLK source swap

§bclk_input_delay: bool

BCLK input delay

§bclk_polarity: ClockPolarity

BCLK polarity

Implementations§

Source§

impl SaiConfig

Source

pub const fn i2s(bclk_div: u32) -> Self

Initialize a constant SaiConfig to be used with an i2s signaling scheme

Trait Implementations§

Source§

impl Default for SaiConfig

Source§

fn default() -> SaiConfig

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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

Source§

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

Source§

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.