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
§fn partial_cmp(&self, other: &Sadmod) -> Option<Ordering>
fn partial_cmp(&self, other: &Sadmod) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more