#[non_exhaustive]pub struct PdmTxSlotConfig {
pub slot_mode: PdmSlotMode,
pub data_format: PdmDataFormat,
pub sd_prescale: u8,
pub sd_scale: PdmSigScaling,
pub hp_scale: PdmSigScaling,
pub lp_scale: PdmSigScaling,
pub sinc_scale: PdmSigScaling,
pub hp_en: bool,
pub hp_cut_off_freq_hz: f32,
pub slot_mask: PdmSlotMask,
}Expand description
PDM TX slot / filter configuration.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.slot_mode: PdmSlotModeMono or stereo slot mode.
data_format: PdmDataFormatPCM or raw PDM data format.
sd_prescale: u8Sigma-delta prescale value.
sd_scale: PdmSigScalingSigma-delta filter input scaling.
hp_scale: PdmSigScalingHigh-pass filter input scaling.
lp_scale: PdmSigScalingLow-pass filter input scaling.
sinc_scale: PdmSigScalingSinc filter input scaling.
hp_en: boolEnable the TX high-pass filter.
hp_cut_off_freq_hz: f32High-pass filter cut-off frequency in Hz.
slot_mask: PdmSlotMaskActive TX slot mask (ESP32 only).
Implementations§
Source§impl PdmTxSlotConfig
impl PdmTxSlotConfig
Sourcepub fn with_slot_mode(self, slot_mode: PdmSlotMode) -> Self
pub fn with_slot_mode(self, slot_mode: PdmSlotMode) -> Self
Assign the given value to the slot_mode field.
Sourcepub fn slot_mode(&self) -> PdmSlotMode
pub fn slot_mode(&self) -> PdmSlotMode
Mono or stereo slot mode.
Sourcepub fn with_data_format(self, data_format: PdmDataFormat) -> Self
pub fn with_data_format(self, data_format: PdmDataFormat) -> Self
Assign the given value to the data_format field.
Sourcepub fn data_format(&self) -> PdmDataFormat
pub fn data_format(&self) -> PdmDataFormat
PCM or raw PDM data format.
Sourcepub fn with_sd_prescale(self, sd_prescale: u8) -> Self
pub fn with_sd_prescale(self, sd_prescale: u8) -> Self
Assign the given value to the sd_prescale field.
Sourcepub fn sd_prescale(&self) -> u8
pub fn sd_prescale(&self) -> u8
Sigma-delta prescale value.
Sourcepub fn with_sd_scale(self, sd_scale: PdmSigScaling) -> Self
pub fn with_sd_scale(self, sd_scale: PdmSigScaling) -> Self
Assign the given value to the sd_scale field.
Sourcepub fn sd_scale(&self) -> PdmSigScaling
pub fn sd_scale(&self) -> PdmSigScaling
Sigma-delta filter input scaling.
Sourcepub fn with_hp_scale(self, hp_scale: PdmSigScaling) -> Self
pub fn with_hp_scale(self, hp_scale: PdmSigScaling) -> Self
Assign the given value to the hp_scale field.
Sourcepub fn hp_scale(&self) -> PdmSigScaling
pub fn hp_scale(&self) -> PdmSigScaling
High-pass filter input scaling.
Sourcepub fn with_lp_scale(self, lp_scale: PdmSigScaling) -> Self
pub fn with_lp_scale(self, lp_scale: PdmSigScaling) -> Self
Assign the given value to the lp_scale field.
Sourcepub fn lp_scale(&self) -> PdmSigScaling
pub fn lp_scale(&self) -> PdmSigScaling
Low-pass filter input scaling.
Sourcepub fn with_sinc_scale(self, sinc_scale: PdmSigScaling) -> Self
pub fn with_sinc_scale(self, sinc_scale: PdmSigScaling) -> Self
Assign the given value to the sinc_scale field.
Sourcepub fn sinc_scale(&self) -> PdmSigScaling
pub fn sinc_scale(&self) -> PdmSigScaling
Sinc filter input scaling.
Sourcepub fn with_hp_en(self, hp_en: bool) -> Self
pub fn with_hp_en(self, hp_en: bool) -> Self
Assign the given value to the hp_en field.
Sourcepub fn with_hp_cut_off_freq_hz(self, hp_cut_off_freq_hz: f32) -> Self
pub fn with_hp_cut_off_freq_hz(self, hp_cut_off_freq_hz: f32) -> Self
Assign the given value to the hp_cut_off_freq_hz field.
Sourcepub fn hp_cut_off_freq_hz(&self) -> f32
pub fn hp_cut_off_freq_hz(&self) -> f32
High-pass filter cut-off frequency in Hz.
Sourcepub fn with_slot_mask(self, slot_mask: PdmSlotMask) -> Self
pub fn with_slot_mask(self, slot_mask: PdmSlotMask) -> Self
Assign the given value to the slot_mask field.
Sourcepub fn slot_mask(&self) -> PdmSlotMask
pub fn slot_mask(&self) -> PdmSlotMask
Active TX slot mask (ESP32 only).
Trait Implementations§
Source§impl Clone for PdmTxSlotConfig
Available on crate feature unstable only.
impl Clone for PdmTxSlotConfig
unstable only.Source§fn clone(&self) -> PdmTxSlotConfig
fn clone(&self) -> PdmTxSlotConfig
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PdmTxSlotConfig
Available on crate feature unstable only.
impl Debug for PdmTxSlotConfig
unstable only.Source§impl PartialEq for PdmTxSlotConfig
Available on crate feature unstable only.
impl PartialEq for PdmTxSlotConfig
unstable only.impl Copy for PdmTxSlotConfig
unstable only.impl StructuralPartialEq for PdmTxSlotConfig
unstable only.Auto Trait Implementations§
impl Freeze for PdmTxSlotConfig
impl RefUnwindSafe for PdmTxSlotConfig
impl Send for PdmTxSlotConfig
impl Sync for PdmTxSlotConfig
impl Unpin for PdmTxSlotConfig
impl UnsafeUnpin for PdmTxSlotConfig
impl UnwindSafe for PdmTxSlotConfig
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)