Enum embassy_stm32::timer::CountingMode
source · #[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 moresource§impl Debug for CountingMode
impl Debug for CountingMode
source§impl Default for CountingMode
impl Default for CountingMode
source§fn default() -> CountingMode
fn default() -> CountingMode
source§impl From<CountingMode> for (Cms, Dir)
impl From<CountingMode> for (Cms, Dir)
source§fn from(value: CountingMode) -> Self
fn from(value: CountingMode) -> Self
source§impl PartialEq for CountingMode
impl PartialEq for CountingMode
source§fn eq(&self, other: &CountingMode) -> bool
fn eq(&self, other: &CountingMode) -> bool
self
and other
values to be equal, and is used
by ==
.