Struct stm32l0x1_hal::timer::Timer
source · pub struct Timer<TIM> { /* private fields */ }
Expand description
16-bit timer
Implementations§
source§impl Timer<TIM2>
impl Timer<TIM2>
sourcepub fn tim2<T: Into<Hertz>>(
timer: TIM2,
clk_ctx: &ClockContext,
timeout: T,
apb: &mut APB1
) -> Self
pub fn tim2<T: Into<Hertz>>(
timer: TIM2,
clk_ctx: &ClockContext,
timeout: T,
apb: &mut APB1
) -> Self
Instantiate a new timer
sourcepub fn unsubscribe(&mut self, event: Event)
pub fn unsubscribe(&mut self, event: Event)
Stops listening for an event
sourcepub fn reset_overflow(&mut self)
pub fn reset_overflow(&mut self)
Resets SR’s UIF register to clear status of overflow.
Unless reset is done, Interrupt handler is going to be continiously called.
source§impl Timer<TIM21>
impl Timer<TIM21>
sourcepub fn tim21<T: Into<Hertz>>(
timer: TIM21,
clk_ctx: &ClockContext,
timeout: T,
apb: &mut APB2
) -> Self
pub fn tim21<T: Into<Hertz>>(
timer: TIM21,
clk_ctx: &ClockContext,
timeout: T,
apb: &mut APB2
) -> Self
Instantiate a new timer
sourcepub fn unsubscribe(&mut self, event: Event)
pub fn unsubscribe(&mut self, event: Event)
Stops listening for an event
sourcepub fn reset_overflow(&mut self)
pub fn reset_overflow(&mut self)
Resets SR’s UIF register to clear status of overflow.
Unless reset is done, Interrupt handler is going to be continiously called.