pub struct Timer<TIM> { /* private fields */ }
Expand description
Hardware timers
Implementations§
Source§impl Timer<TIM2>
impl Timer<TIM2>
Sourcepub fn tim2(tim: TIM2, timeout: Hertz, clocks: Clocks, apb: &mut APB1R1) -> Self
pub fn tim2(tim: TIM2, timeout: Hertz, clocks: Clocks, apb: &mut APB1R1) -> Self
Configures a TIM peripheral as a periodic count down timer
Sourcepub fn free_running_tim2(
tim: TIM2,
clocks: Clocks,
frequency: Hertz,
event_on_overflow: bool,
apb: &mut APB1R1,
) -> Self
pub fn free_running_tim2( tim: TIM2, clocks: Clocks, frequency: Hertz, event_on_overflow: bool, apb: &mut APB1R1, ) -> Self
Start a free running, monotonic, timer running at some specific frequency.
May generate events on overflow of the timer.
Sourcepub fn clear_interrupt(&mut self, event: Event)
pub fn clear_interrupt(&mut self, event: Event)
Clears interrupt associated with event
.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
Sourcepub fn clear_update_interrupt_flag(&mut self)
pub fn clear_update_interrupt_flag(&mut self)
Clears Update Interrupt Flag
Source§impl Timer<TIM6>
impl Timer<TIM6>
Sourcepub fn tim6(tim: TIM6, timeout: Hertz, clocks: Clocks, apb: &mut APB1R1) -> Self
pub fn tim6(tim: TIM6, timeout: Hertz, clocks: Clocks, apb: &mut APB1R1) -> Self
Configures a TIM peripheral as a periodic count down timer
Sourcepub fn free_running_tim6(
tim: TIM6,
clocks: Clocks,
frequency: Hertz,
event_on_overflow: bool,
apb: &mut APB1R1,
) -> Self
pub fn free_running_tim6( tim: TIM6, clocks: Clocks, frequency: Hertz, event_on_overflow: bool, apb: &mut APB1R1, ) -> Self
Start a free running, monotonic, timer running at some specific frequency.
May generate events on overflow of the timer.
Sourcepub fn clear_interrupt(&mut self, event: Event)
pub fn clear_interrupt(&mut self, event: Event)
Clears interrupt associated with event
.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
Sourcepub fn clear_update_interrupt_flag(&mut self)
pub fn clear_update_interrupt_flag(&mut self)
Clears Update Interrupt Flag
Source§impl Timer<TIM15>
impl Timer<TIM15>
Sourcepub fn tim15(tim: TIM15, timeout: Hertz, clocks: Clocks, apb: &mut APB2) -> Self
pub fn tim15(tim: TIM15, timeout: Hertz, clocks: Clocks, apb: &mut APB2) -> Self
Configures a TIM peripheral as a periodic count down timer
Sourcepub fn free_running_tim15(
tim: TIM15,
clocks: Clocks,
frequency: Hertz,
event_on_overflow: bool,
apb: &mut APB2,
) -> Self
pub fn free_running_tim15( tim: TIM15, clocks: Clocks, frequency: Hertz, event_on_overflow: bool, apb: &mut APB2, ) -> Self
Start a free running, monotonic, timer running at some specific frequency.
May generate events on overflow of the timer.
Sourcepub fn clear_interrupt(&mut self, event: Event)
pub fn clear_interrupt(&mut self, event: Event)
Clears interrupt associated with event
.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
Sourcepub fn clear_update_interrupt_flag(&mut self)
pub fn clear_update_interrupt_flag(&mut self)
Clears Update Interrupt Flag
Source§impl Timer<TIM16>
impl Timer<TIM16>
Sourcepub fn tim16(tim: TIM16, timeout: Hertz, clocks: Clocks, apb: &mut APB2) -> Self
pub fn tim16(tim: TIM16, timeout: Hertz, clocks: Clocks, apb: &mut APB2) -> Self
Configures a TIM peripheral as a periodic count down timer
Sourcepub fn free_running_tim16(
tim: TIM16,
clocks: Clocks,
frequency: Hertz,
event_on_overflow: bool,
apb: &mut APB2,
) -> Self
pub fn free_running_tim16( tim: TIM16, clocks: Clocks, frequency: Hertz, event_on_overflow: bool, apb: &mut APB2, ) -> Self
Start a free running, monotonic, timer running at some specific frequency.
May generate events on overflow of the timer.
Sourcepub fn clear_interrupt(&mut self, event: Event)
pub fn clear_interrupt(&mut self, event: Event)
Clears interrupt associated with event
.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
Sourcepub fn clear_update_interrupt_flag(&mut self)
pub fn clear_update_interrupt_flag(&mut self)
Clears Update Interrupt Flag
Source§impl Timer<TIM7>
impl Timer<TIM7>
Sourcepub fn tim7(tim: TIM7, timeout: Hertz, clocks: Clocks, apb: &mut APB1R1) -> Self
pub fn tim7(tim: TIM7, timeout: Hertz, clocks: Clocks, apb: &mut APB1R1) -> Self
Configures a TIM peripheral as a periodic count down timer
Sourcepub fn free_running_tim7(
tim: TIM7,
clocks: Clocks,
frequency: Hertz,
event_on_overflow: bool,
apb: &mut APB1R1,
) -> Self
pub fn free_running_tim7( tim: TIM7, clocks: Clocks, frequency: Hertz, event_on_overflow: bool, apb: &mut APB1R1, ) -> Self
Start a free running, monotonic, timer running at some specific frequency.
May generate events on overflow of the timer.
Sourcepub fn clear_interrupt(&mut self, event: Event)
pub fn clear_interrupt(&mut self, event: Event)
Clears interrupt associated with event
.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
Sourcepub fn clear_update_interrupt_flag(&mut self)
pub fn clear_update_interrupt_flag(&mut self)
Clears Update Interrupt Flag