Struct stm32_i2s_v12x::MasterConfig[][src]

pub struct MasterConfig<F> { /* fields omitted */ }

Configuration for master mode

Implementations

impl<F> MasterConfig<F> where
    F: DataFormat
[src]

pub fn with_division(
    division: u16,
    data_format: F,
    frame_format: FrameFormat,
    polarity: Polarity,
    master_clock: MasterClock
) -> Self
[src]

Creates a configuration with a manually specified division from the input clock to the output bit clock

Panics

This function panics if division is outside the range [4, 511].

pub fn with_sample_rate(
    frequency_in: u32,
    sample_rate: u32,
    data_format: F,
    frame_format: FrameFormat,
    polarity: Polarity,
    master_clock: MasterClock
) -> Self
[src]

Creates a configuration with automatic division based on the input clock frequency and desired sample rate

frequency_in: The frequency of the I2S clock entering the I2S peripheral, in hertz

sample_rate: The desired audio sample rate (for each channel) in samples per second

Panics

This function panics if the calculated division is outside the range [4, 511].

Trait Implementations

impl<F: Clone> Clone for MasterConfig<F>[src]

impl<F: Debug> Debug for MasterConfig<F>[src]

Auto Trait Implementations

impl<F> Send for MasterConfig<F> where
    F: Send
[src]

impl<F> Sync for MasterConfig<F> where
    F: Sync
[src]

impl<F> Unpin for MasterConfig<F> where
    F: Unpin
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.