Struct stm32_hal2::timer::TimerConfig
source · pub struct TimerConfig {
pub one_pulse_mode: bool,
pub update_request_source: UpdateReqSrc,
pub auto_reload_preload: bool,
pub alignment: Alignment,
pub capture_compare_dma: CaptureCompareDma,
pub direction: CountDir,
}
Expand description
Initial configuration data for Timer peripherals.
Fields§
§one_pulse_mode: bool
If one_pulse_mode
is true, the counter stops counting at the next update event
(clearing the bit CEN). If false, Counter is not stopped at update event. Defaults to false.
Sets TIMx_CR
register, OPM
field.
update_request_source: UpdateReqSrc
Update request source. Ie, counter overflow/underflow only, or any. defaults to any.
auto_reload_preload: bool
Set true
to buffer the preload. Useful when changing period and duty while the timer is running.
Default to false.
alignment: Alignment
Select center or edge alignment. Defaults to edge.
capture_compare_dma: CaptureCompareDma
Sets when CCx DMA requests occur. Defaults to on CCx event.
direction: CountDir
Timer counting direction. Defaults to up.
Trait Implementations§
source§impl Clone for TimerConfig
impl Clone for TimerConfig
source§fn clone(&self) -> TimerConfig
fn clone(&self) -> TimerConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more