Struct stm32f30x_hal::timer::Timer
[−]
[src]
pub struct Timer<TIM> { /* fields omitted */ }
Hardware timers
Methods
impl Timer<TIM2>
[src]
pub fn tim2<T>(tim: TIM2, timeout: T, clocks: Clocks, apb1: &mut APB1) -> Self where
T: Into<Hertz>,
[src]
T: Into<Hertz>,
Configures a TIM peripheral as a periodic count down timer
pub fn listen(&mut self, event: Event)
[src]
Starts listening for an event
pub fn unlisten(&mut self, event: Event)
[src]
Stops listening for an event
pub fn free(self) -> TIM2
[src]
Releases the TIM peripheral
impl Timer<TIM3>
[src]
pub fn tim3<T>(tim: TIM3, timeout: T, clocks: Clocks, apb1: &mut APB1) -> Self where
T: Into<Hertz>,
[src]
T: Into<Hertz>,
Configures a TIM peripheral as a periodic count down timer
pub fn listen(&mut self, event: Event)
[src]
Starts listening for an event
pub fn unlisten(&mut self, event: Event)
[src]
Stops listening for an event
pub fn free(self) -> TIM3
[src]
Releases the TIM peripheral
impl Timer<TIM4>
[src]
pub fn tim4<T>(tim: TIM4, timeout: T, clocks: Clocks, apb1: &mut APB1) -> Self where
T: Into<Hertz>,
[src]
T: Into<Hertz>,
Configures a TIM peripheral as a periodic count down timer
pub fn listen(&mut self, event: Event)
[src]
Starts listening for an event
pub fn unlisten(&mut self, event: Event)
[src]
Stops listening for an event
pub fn free(self) -> TIM4
[src]
Releases the TIM peripheral
impl Timer<TIM6>
[src]
pub fn tim6<T>(tim: TIM6, timeout: T, clocks: Clocks, apb1: &mut APB1) -> Self where
T: Into<Hertz>,
[src]
T: Into<Hertz>,
Configures a TIM peripheral as a periodic count down timer
pub fn listen(&mut self, event: Event)
[src]
Starts listening for an event
pub fn unlisten(&mut self, event: Event)
[src]
Stops listening for an event
pub fn free(self) -> TIM6
[src]
Releases the TIM peripheral
impl Timer<TIM7>
[src]
pub fn tim7<T>(tim: TIM7, timeout: T, clocks: Clocks, apb1: &mut APB1) -> Self where
T: Into<Hertz>,
[src]
T: Into<Hertz>,
Configures a TIM peripheral as a periodic count down timer
pub fn listen(&mut self, event: Event)
[src]
Starts listening for an event
pub fn unlisten(&mut self, event: Event)
[src]
Stops listening for an event
pub fn free(self) -> TIM7
[src]
Releases the TIM peripheral
Trait Implementations
impl Periodic for Timer<TIM2>
[src]
impl CountDown for Timer<TIM2>
[src]
type Time = Hertz
The unit of time used by this timer
fn start<T>(&mut self, timeout: T) where
T: Into<Hertz>,
[src]
T: Into<Hertz>,
Starts a new count down
fn wait(&mut self) -> Result<(), Void>
[src]
Non-blockingly "waits" until the count down finishes Read more
impl Periodic for Timer<TIM3>
[src]
impl CountDown for Timer<TIM3>
[src]
type Time = Hertz
The unit of time used by this timer
fn start<T>(&mut self, timeout: T) where
T: Into<Hertz>,
[src]
T: Into<Hertz>,
Starts a new count down
fn wait(&mut self) -> Result<(), Void>
[src]
Non-blockingly "waits" until the count down finishes Read more
impl Periodic for Timer<TIM4>
[src]
impl CountDown for Timer<TIM4>
[src]
type Time = Hertz
The unit of time used by this timer
fn start<T>(&mut self, timeout: T) where
T: Into<Hertz>,
[src]
T: Into<Hertz>,
Starts a new count down
fn wait(&mut self) -> Result<(), Void>
[src]
Non-blockingly "waits" until the count down finishes Read more
impl Periodic for Timer<TIM6>
[src]
impl CountDown for Timer<TIM6>
[src]
type Time = Hertz
The unit of time used by this timer
fn start<T>(&mut self, timeout: T) where
T: Into<Hertz>,
[src]
T: Into<Hertz>,
Starts a new count down
fn wait(&mut self) -> Result<(), Void>
[src]
Non-blockingly "waits" until the count down finishes Read more