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: boolIf 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: UpdateReqSrcUpdate request source. Ie, counter overflow/underflow only, or any. defaults to any.
auto_reload_preload: boolSet true to buffer the preload. Useful when changing period and duty while the timer is running.
Default to false.
alignment: AlignmentSelect center or edge alignment. Defaults to edge.
capture_compare_dma: CaptureCompareDmaSets when CCx DMA requests occur. Defaults to on CCx event.
direction: CountDirTimer 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 moreAuto Trait Implementations§
impl RefUnwindSafe for TimerConfig
impl Send for TimerConfig
impl Sync for TimerConfig
impl Unpin for TimerConfig
impl UnwindSafe for TimerConfig
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
Mutably borrows from an owned value. Read more