pub struct Filter<'tr, 'ti, 'a, 'd, T, M, D>{
pub regular: FilterRegular<'a, 'd, 'tr, T, M, D>,
pub injected: FilterInjected<'a, 'd, 'ti, T, M, D>,
pub awd: AnalogWatchdog<'a, 'd, T, M>,
pub extremes: ExtremesDetector<'a, 'd, T, M>,
/* private fields */
}Expand description
An enabled filter, split into its regular, injected, watchdog and extremes parts.
Fields§
§regular: FilterRegular<'a, 'd, 'tr, T, M, D>Regular-conversion half.
injected: FilterInjected<'a, 'd, 'ti, T, M, D>Injected-conversion half.
awd: AnalogWatchdog<'a, 'd, T, M>Analog watchdog.
extremes: ExtremesDetector<'a, 'd, T, M>Extremes detector.
Implementations§
Source§impl<'tr, 'ti, 'a, 'd, T, M, D> Filter<'tr, 'ti, 'a, 'd, T, M, D>
impl<'tr, 'ti, 'a, 'd, T, M, D> Filter<'tr, 'ti, 'a, 'd, T, M, D>
Sourcepub fn disable(self) -> FilterDisabled<'a, 'd, T, M>
pub fn disable(self) -> FilterDisabled<'a, 'd, T, M>
Disable the filter.
Sourcepub fn conversion_timer(&self) -> u32
pub fn conversion_timer(&self) -> u32
28-bit conversion-time counter: CNVCNT[27:0] / fDFSDMCLK is the time
of the current (or most recent) conversion.
The timer runs on the DFSDM kernel clock (fDFSDMCLK), starts when a
conversion starts and stops when it finishes, so it measures the interval
between the first and last serial sample of one conversion. The value is
proportional to FOSR * IOSR / fCKIN, where fCKIN is the channel input
clock (or the parallel input data rate), and it changes with each
completed conversion. A bypassed filter (FOSR = 1) yields 0.
Not a reliable liveness signal: it only updates when a conversion
completes, so sampling it slower than the conversion rate aliases and
looks stuck even while the filter is healthy. Use ClockAbsenceDetector
or an overrun/timeout on your reads to detect starvation instead.
Sourcepub fn replace_regular_transceiver<'new_reg>(
self,
transceiver: &'new_reg dyn TransceiverTrait<T, Enabled>,
) -> Filter<'new_reg, 'ti, 'a, 'd, T, M, D>
pub fn replace_regular_transceiver<'new_reg>( self, transceiver: &'new_reg dyn TransceiverTrait<T, Enabled>, ) -> Filter<'new_reg, 'ti, 'a, 'd, T, M, D>
Replaces the regular transceiver, releasing the old borrow so the
previous transceiver can be mutated afterwards. Since this may change
the lifetime of the borrows, it consumes and returns a new Filter
rather than mutating in place. This is pure borrow-checker bookkeeping,
not a hardware requirement - see FilterRegular::assign_transceiver
for the in-place alternative when the lifetime doesn’t need to change.
Sourcepub fn replace_injected_transceivers<'new_inj, const N: usize>(
self,
transceivers: [&'new_inj dyn TransceiverTrait<T, Enabled>; N],
) -> Filter<'tr, 'new_inj, 'a, 'd, T, M, D>
pub fn replace_injected_transceivers<'new_inj, const N: usize>( self, transceivers: [&'new_inj dyn TransceiverTrait<T, Enabled>; N], ) -> Filter<'tr, 'new_inj, 'a, 'd, T, M, D>
Replaces the injected transceivers, releasing the old borrows so the
previous transceivers can be mutated afterwards. Since this may change
the lifetime of the borrows, it consumes and returns a new Filter
rather than mutating in place. This is pure borrow-checker bookkeeping,
not a hardware requirement - see FilterInjected::assign_transceivers
for the in-place alternative when the lifetime doesn’t need to change.