Enum stm32_metapac::adf::vals::Sadmod
#[repr(u8)]pub enum Sadmod {
THRESHOLDESTIMATEDAMBIENTNOISE = 0,
THRESHOLDMINIMUMNOISELEVEL = 1,
THRESHOLDMINIMUMNOISELEVELX4 = 2,
_RESERVED_3 = 3,
}
Expand description
SAD working mode. This bitfield is set and cleared by software. It is used to define the way the SAD works
Variants§
THRESHOLDESTIMATEDAMBIENTNOISE = 0
Threshold value computed according to the estimated ambient noise. The SAD triggers when the sound level (SDLVL) is bigger than the defined threshold. In this mode, the SAD works like a voice activity detector.
THRESHOLDMINIMUMNOISELEVEL = 1
Threshold value equal to ANMIN[12:0], multiplied by the gain selected by SNTHR[3:0] The SAD triggers when the sound level (SDLVL) is bigger than the defined threshold. In this mode, the SAD works like a sound detector.
THRESHOLDMINIMUMNOISELEVELX4 = 2
Threshold value given by 4 x ANMIN[12:0]. The SAD triggers when the estimated ambient noise (ANLVL), multiplied by the gain selected by SNTHR[3:0] is bigger than the defined threshold. In this mode, the SAD is working like an ambient noise estimator. Hysteresis function cannot be used in this mode.
_RESERVED_3 = 3
Implementations§
Trait Implementations§
§impl Ord for Sadmod
impl Ord for Sadmod
§impl PartialOrd for Sadmod
impl PartialOrd for Sadmod
impl Copy for Sadmod
impl Eq for Sadmod
impl StructuralPartialEq for Sadmod
Auto Trait Implementations§
impl Freeze for Sadmod
impl RefUnwindSafe for Sadmod
impl Send for Sadmod
impl Sync for Sadmod
impl Unpin for Sadmod
impl UnwindSafe for Sadmod
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)