Struct stm32_i2s_v12x::MasterConfig [−][src]
Configuration for master mode
Implementations
impl<F> MasterConfig<F> where
F: DataFormat,
[src]
F: DataFormat,
pub fn with_division(
division: u16,
data_format: F,
frame_format: FrameFormat,
polarity: Polarity,
master_clock: MasterClock
) -> Self
[src]
division: u16,
data_format: F,
frame_format: FrameFormat,
polarity: Polarity,
master_clock: MasterClock
) -> Self
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]
frequency_in: u32,
sample_rate: u32,
data_format: F,
frame_format: FrameFormat,
polarity: Polarity,
master_clock: MasterClock
) -> Self
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]
fn clone(&self) -> MasterConfig<F>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<F: Debug> Debug for MasterConfig<F>
[src]
Auto Trait Implementations
impl<F> Send for MasterConfig<F> where
F: Send,
[src]
F: Send,
impl<F> Sync for MasterConfig<F> where
F: Sync,
[src]
F: Sync,
impl<F> Unpin for MasterConfig<F> where
F: Unpin,
[src]
F: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,