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 duplicate 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 Freeze for TimerConfig
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