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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.