pub struct AnalogWatchdog<'a, 'd, T, M>{ /* private fields */ }Expand description
Analog watchdog of a filter.
Implementations§
Source§impl<'a, 'd, T, M> AnalogWatchdog<'a, 'd, T, M>
impl<'a, 'd, T, M> AnalogWatchdog<'a, 'd, T, M>
Sourcepub async fn wait_for_event(&mut self) -> AnalogWatchdogEvent
pub async fn wait_for_event(&mut self) -> AnalogWatchdogEvent
Wait for an analog watchdog event.
Sourcepub fn configure(&mut self, config: AnalogWatchdogConfig)
pub fn configure(&mut self, config: AnalogWatchdogConfig)
Apply a full configuration.
Sourcepub fn set_high_threshold(&mut self, threshold: i32)
pub fn set_high_threshold(&mut self, threshold: i32)
Set the high threshold.
Thresholds are on the 24-bit main-filter scale in both AWFSEL modes
and saturate to the i24 range: 0x7F_FFFF / -0x80_0000 (or any
out-of-range value) mean “never trigger”. With fast mode enabled
(see enable_analog_watchdog_fastmode)
the hardware compares only the top 16 threshold bits against the
watchdog filter output (resolution 256); toggling fast mode does not
change the meaning of a stored threshold.
Sourcepub fn set_low_threshold(&mut self, threshold: i32)
pub fn set_low_threshold(&mut self, threshold: i32)
Set the low threshold.
See set_high_threshold for the scale,
saturation and fast-mode semantics.
Sourcepub fn assign_high_to_break_signals(&mut self, break_signals: BreakSignals)
pub fn assign_high_to_break_signals(&mut self, break_signals: BreakSignals)
Assign break signals to fire on the high threshold.
§Note
This routes a watchdog event to a DFSDM break wire (BKAWH); the receiving timer must separately map that wire to a break input (BRK).
Sourcepub fn assign_low_to_break_signals(&mut self, break_signals: BreakSignals)
pub fn assign_low_to_break_signals(&mut self, break_signals: BreakSignals)
Assign break signals to fire on the low threshold.
§Note
This routes a watchdog event to a DFSDM break wire (BKAWL); the receiving timer must separately map that wire to a break input (BRK).
Sourcepub fn enable_analog_watchdog_fastmode(&mut self, enabled: bool)
pub fn enable_analog_watchdog_fastmode(&mut self, enabled: bool)
Enable or disable the watchdog filter as the comparison source (AWFSEL).
§Note
AWFSEL is per-channel and only meaningful in fast mode, where the watchdog compares against its own fast filter instead of the main filter output.
Thresholds are mode-independent (see
set_high_threshold): toggling this
changes the comparison source and its resolution, not the meaning of
already-written thresholds.
Sourcepub fn assign_transceivers<const N: usize>(
&mut self,
transceivers: [&dyn TransceiverTrait<T, Enabled>; N],
)
pub fn assign_transceivers<const N: usize>( &mut self, transceivers: [&dyn TransceiverTrait<T, Enabled>; N], )
Assign provided transceivers to this analog watchdog
Sourcepub fn channel_flag_low(&self, channel: TransceiverChannel) -> bool
pub fn channel_flag_low(&self, channel: TransceiverChannel) -> bool
Whether the low-threshold flag is set for channel.
Sourcepub fn channel_flag_high(&self, channel: TransceiverChannel) -> bool
pub fn channel_flag_high(&self, channel: TransceiverChannel) -> bool
Whether the high-threshold flag is set for channel.
Sourcepub fn flags_high(&self) -> u8
pub fn flags_high(&self) -> u8
High-threshold flag bitmap.
Sourcepub fn clear_channel_flags_low(&mut self, channel: TransceiverChannel)
pub fn clear_channel_flags_low(&mut self, channel: TransceiverChannel)
Clear the low-threshold flag for channel.
Sourcepub fn clear_channel_flags_high(&mut self, channel: TransceiverChannel)
pub fn clear_channel_flags_high(&mut self, channel: TransceiverChannel)
Clear the high-threshold flag for channel.
Sourcepub fn clear_flags_low(&mut self)
pub fn clear_flags_low(&mut self)
Clear all low-threshold flags.
Sourcepub fn clear_flags_high(&mut self)
pub fn clear_flags_high(&mut self)
Clear all high-threshold flags.