pub struct ShortCircuitDetector<'a, 'd, T>where
T: Instance,{ /* private fields */ }Expand description
Short-circuit detector: flags when a transceiver’s input stays constant (consecutive identical bits) for longer than the threshold, indicating a stuck or short-circuited input.
Implementations§
Source§impl<'a, 'd, T> ShortCircuitDetector<'a, 'd, T>
impl<'a, 'd, T> ShortCircuitDetector<'a, 'd, T>
Sourcepub async fn wait_for_event(&mut self) -> u8
pub async fn wait_for_event(&mut self) -> u8
Wait for a short-circuit-detector event
Source§impl<'a, 'd, T> ShortCircuitDetector<'a, 'd, T>where
T: Instance,
impl<'a, 'd, T> ShortCircuitDetector<'a, 'd, T>where
T: Instance,
Sourcepub fn assign_transceivers<const N: usize>(
&mut self,
assignments: [ShortCircuitAssignment<'_, T>; N],
)
pub fn assign_transceivers<const N: usize>( &mut self, assignments: [ShortCircuitAssignment<'_, T>; N], )
Assigns the transceivers to the short-circuit-detector (overwrites assignments)
Sourcepub fn unassign_transceivers<const N: usize>(
&mut self,
transceivers: [&dyn TransceiverTrait<T, Enabled>; N],
)
pub fn unassign_transceivers<const N: usize>( &mut self, transceivers: [&dyn TransceiverTrait<T, Enabled>; N], )
Unassigns the transceivers from the short-circuit-detector
Sourcepub fn assign_break_signals(
&mut self,
transceiver: &dyn TransceiverTrait<T, Enabled>,
signals: BreakSignals,
)
pub fn assign_break_signals( &mut self, transceiver: &dyn TransceiverTrait<T, Enabled>, signals: BreakSignals, )
Assign break-signals for short-circuit-event of transceiver
§Note
This routes a short-circuit event to a DFSDM break wire (BKSCD); the receiving timer must separately map that wire to a break input (BRK).
Sourcepub fn set_threshold(
&mut self,
transceiver: &dyn TransceiverTrait<T, Enabled>,
threshold: u8,
)
pub fn set_threshold( &mut self, transceiver: &dyn TransceiverTrait<T, Enabled>, threshold: u8, )
Set the short-circuit threshold for a transceiver.
Sourcepub fn channel_flag(&self, channel: TransceiverChannel) -> bool
pub fn channel_flag(&self, channel: TransceiverChannel) -> bool
Whether the short-circuit flag is set for channel.
Sourcepub fn clear_channel_flags(&mut self, channel: TransceiverChannel)
pub fn clear_channel_flags(&mut self, channel: TransceiverChannel)
Clear the short-circuit flag for channel.
Sourcepub fn clear_flags(&mut self)
pub fn clear_flags(&mut self)
Clear all pending detector flags for currently armed channels.
Use this after assigning transceivers to clear any startup residue before waiting for events.