pub struct Channel<'d, const UNIT: usize, const NUM: usize> { /* private fields */ }
Available on crate feature
unstable
only.Expand description
Represents a channel within a pulse counter unit.
Implementations§
Source§impl<const UNIT: usize, const NUM: usize> Channel<'_, UNIT, NUM>
impl<const UNIT: usize, const NUM: usize> Channel<'_, UNIT, NUM>
Sourcepub fn set_ctrl_mode(&self, low: CtrlMode, high: CtrlMode)
pub fn set_ctrl_mode(&self, low: CtrlMode, high: CtrlMode)
Configures how the channel behaves based on the level of the control signal.
low
- The behaviour of the channel when the control signal is low.high
- The behaviour of the channel when the control signal is high.
Sourcepub fn set_input_mode(&self, neg_edge: EdgeMode, pos_edge: EdgeMode)
pub fn set_input_mode(&self, neg_edge: EdgeMode, pos_edge: EdgeMode)
Configures how the channel affects the counter based on the transition made by the input signal.
neg_edge
- The effect on the counter when the input signal goes 1 -> 0.pos_edge
- The effect on the counter when the input signal goes 0 -> 1.
Sourcepub fn set_ctrl_signal<P: PeripheralInput>(
&self,
source: impl Peripheral<P = P>,
) -> &Self
pub fn set_ctrl_signal<P: PeripheralInput>( &self, source: impl Peripheral<P = P>, ) -> &Self
Set the control signal (pin/high/low) for this channel
Sourcepub fn set_edge_signal<P: PeripheralInput>(
&self,
source: impl Peripheral<P = P>,
) -> &Self
pub fn set_edge_signal<P: PeripheralInput>( &self, source: impl Peripheral<P = P>, ) -> &Self
Set the edge signal (pin/high/low) for this channel