esp_idf_hal::timer

Type Alias TimerConfig

Source
pub type TimerConfig = Config;

Aliased Type§

struct TimerConfig {
    pub divider: u32,
    pub xtal: bool,
    pub auto_reload: bool,
}

Fields§

§divider: u32§xtal: bool§auto_reload: bool

Enable or disable counter reload function when alarm event occurs.

Enabling this makes the hardware automatically reset the counter to the value set by TimerDriver::set_counter when the alarm is fired. This allows creating timers that automatically fire at a given interval without the software having to do anything after the timer setup.

Implementations

Source§

impl Config

Source

pub fn new() -> Self

Source

pub fn divider(self, divider: u32) -> Self

Source

pub fn xtal(self, xtal: bool) -> Self

Source

pub fn auto_reload(self, auto_reload: bool) -> Self

Trait Implementations

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Config

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for Config