#[repr(u8)]pub enum CountingMode {
EdgeAlignedUp = 0,
EdgeAlignedDown = 1,
CenterAlignedDownInterrupts = 2,
CenterAlignedUpInterrupts = 3,
CenterAlignedBothInterrupts = 4,
}
Expand description
Timer counting mode.
Variants§
EdgeAlignedUp = 0
The timer counts up to the reload value and then resets back to 0.
EdgeAlignedDown = 1
The timer counts down to 0 and then resets back to the reload value.
CenterAlignedDownInterrupts = 2
The timer counts up to the reload value and then counts back to 0.
The output compare interrupt flags of channels configured in output are set when the counter is counting down.
CenterAlignedUpInterrupts = 3
The timer counts up to the reload value and then counts back to 0.
The output compare interrupt flags of channels configured in output are set when the counter is counting up.
CenterAlignedBothInterrupts = 4
The timer counts up to the reload value and then counts back to 0.
The output compare interrupt flags of channels configured in output are set when the counter is counting both up or down.
Implementations§
Source§impl CountingMode
impl CountingMode
Sourcepub fn is_edge_aligned(&self) -> bool
pub fn is_edge_aligned(&self) -> bool
Return whether this mode is edge-aligned (up or down).
Sourcepub fn is_center_aligned(&self) -> bool
pub fn is_center_aligned(&self) -> bool
Return whether this mode is center-aligned.
Trait Implementations§
Source§impl Clone for CountingMode
impl Clone for CountingMode
Source§fn clone(&self) -> CountingMode
fn clone(&self) -> CountingMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more