#[non_exhaustive]pub struct TdmConfig { /* private fields */ }Expand description
TDM mode peripheral configuration.
Implementations§
Source§impl TdmConfig
impl TdmConfig
Sourcepub fn with_rx_config(self, rx_config: TdmUnitConfig) -> Self
pub fn with_rx_config(self, rx_config: TdmUnitConfig) -> Self
Assign the given value to the rx_config field.
Sourcepub fn rx_config(&self) -> TdmUnitConfig
pub fn rx_config(&self) -> TdmUnitConfig
Receiver unit config
Sourcepub fn with_tx_config(self, tx_config: TdmUnitConfig) -> Self
pub fn with_tx_config(self, tx_config: TdmUnitConfig) -> Self
Assign the given value to the tx_config field.
Sourcepub fn tx_config(&self) -> TdmUnitConfig
pub fn tx_config(&self) -> TdmUnitConfig
Transmitter unit config
Sourcepub fn with_signal_loopback(self, signal_loopback: bool) -> Self
pub fn with_signal_loopback(self, signal_loopback: bool) -> Self
Assign the given value to the signal_loopback field.
Sourcepub fn signal_loopback(&self) -> bool
pub fn signal_loopback(&self) -> bool
Sets I2S_SIG_LOOPBACK: TX and RX share the same WS and BCK.
Sourcepub fn with_sample_rate(self, sample_rate: Rate) -> Self
pub fn with_sample_rate(self, sample_rate: Rate) -> Self
Assign the given value to the sample_rate field.
Sourcepub fn sample_rate(&self) -> Rate
pub fn sample_rate(&self) -> Rate
The target sample rate
Sourcepub fn with_data_format(self, data_format: DataFormat) -> Self
pub fn with_data_format(self, data_format: DataFormat) -> Self
Assign the given value to the data_format field.
Sourcepub fn data_format(&self) -> DataFormat
pub fn data_format(&self) -> DataFormat
Format of the data
Source§impl TdmConfig
impl TdmConfig
Sourcepub fn new_tdm_philips() -> Self
pub fn new_tdm_philips() -> Self
TDM Philips standard configuration with two 16-bit active channels.
Sourcepub fn new_tdm_msb() -> Self
pub fn new_tdm_msb() -> Self
TDM MSB standard configuration with two 16-bit active channels.
Sourcepub fn new_tdm_pcm_short() -> Self
pub fn new_tdm_pcm_short() -> Self
TDM PCM short frame standard configuration with two 16-bit active channels.
Sourcepub fn with_channels(self, channels: Channels) -> Self
pub fn with_channels(self, channels: Channels) -> Self
Assign the given value to the channels field in both units.
Sourcepub fn with_ws_width(self, ws_width: WsWidth) -> Self
pub fn with_ws_width(self, ws_width: WsWidth) -> Self
Assign the given value to the ws_width field in both units.
Sourcepub fn with_ws_polarity(self, ws_polarity: Polarity) -> Self
pub fn with_ws_polarity(self, ws_polarity: Polarity) -> Self
Assign the given value to the ws_polarity field in both units.
Sourcepub fn with_msb_shift(self, msb_shift: bool) -> Self
pub fn with_msb_shift(self, msb_shift: bool) -> Self
Assign the given value to the msb_shift field in both units.
Sourcepub fn with_endianness(self, endianness: Endianness) -> Self
pub fn with_endianness(self, endianness: Endianness) -> Self
Assign the given value to the endianness field in both units.
Trait Implementations§
impl Copy for TdmConfig
unstable only.impl Eq for TdmConfig
unstable only.impl StructuralPartialEq for TdmConfig
unstable only.Auto Trait Implementations§
impl Freeze for TdmConfig
impl RefUnwindSafe for TdmConfig
impl Send for TdmConfig
impl Sync for TdmConfig
impl Unpin for TdmConfig
impl UnsafeUnpin for TdmConfig
impl UnwindSafe for TdmConfig
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)