#[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<(Cms, Dir)> for CountingMode
impl From<(Cms, Dir)> for 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
impl Copy for CountingMode
impl Eq for CountingMode
impl StructuralPartialEq for CountingMode
Auto Trait Implementations§
impl Freeze for CountingMode
impl RefUnwindSafe for CountingMode
impl Send for CountingMode
impl Sync for CountingMode
impl Unpin for CountingMode
impl UnwindSafe for CountingMode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)