Enum stm32_hal2::timer::Alignment
source · [−]pub enum Alignment {
Edge,
Center1,
Center2,
Center3,
}
Expand description
Output alignment. Sets TIMx_CR1
register, CMS
field.
Variants
Edge
Edge-aligned mode. The counter counts up or down depending on the direction bit (DIR).
Center1
Center-aligned mode 1. The counter counts up and down alternatively. Output compare interrupt flags of channels configured in output (CCxS=00 in TIMx_CCMRx register) are set only when the counter is counting down.
Center2
Center-aligned mode 2. The counter counts up and down alternatively. Output compare interrupt flags of channels configured in output (CCxS=00 in TIMx_CCMRx register) are set only when the counter is counting up.
Center3
Center-aligned mode 3. The counter counts up and down alternatively. Output compare interrupt flags of channels configured in output (CCxS=00 in TIMx_CCMRx register) are set both when the counter is counting up or down.