[][src]Struct stm32l0xx_hal::timer::Timer

pub struct Timer<TIM> { /* fields omitted */ }

Hardware timers

Methods

impl Timer<SYST>[src]

pub fn syst<T>(syst: SYST, timeout: T, rcc: &mut Rcc) -> Self where
    T: Into<Hertz>, 
[src]

Configures the SYST clock as a periodic count down timer

pub fn listen(&mut self)[src]

Starts listening

pub fn unlisten(&mut self)[src]

Stops listening

impl Timer<TIM2> where
    TIM2: GeneralPurposeTimer
[src]

pub fn tim2<T>(tim: TIM2, timeout: T, rcc: &mut Rcc) -> Self where
    T: Into<Hertz>, 
[src]

Configures a TIM peripheral as a periodic count down timer

pub fn listen(&mut self)[src]

Starts listening

pub fn unlisten(&mut self)[src]

Stops listening

pub fn clear_irq(&mut self)[src]

Clears interrupt flag

pub fn release(self) -> TIM2[src]

Releases the TIM peripheral

pub fn reset(&mut self)[src]

Reset counter

pub fn select_master_mode(
    &mut self,
    variant: <TIM2 as GeneralPurposeTimer>::MasterMode
)
[src]

Select master mode

impl Timer<TIM3> where
    TIM3: GeneralPurposeTimer
[src]

pub fn tim3<T>(tim: TIM3, timeout: T, rcc: &mut Rcc) -> Self where
    T: Into<Hertz>, 
[src]

Configures a TIM peripheral as a periodic count down timer

pub fn listen(&mut self)[src]

Starts listening

pub fn unlisten(&mut self)[src]

Stops listening

pub fn clear_irq(&mut self)[src]

Clears interrupt flag

pub fn release(self) -> TIM3[src]

Releases the TIM peripheral

pub fn reset(&mut self)[src]

Reset counter

pub fn select_master_mode(
    &mut self,
    variant: <TIM3 as GeneralPurposeTimer>::MasterMode
)
[src]

Select master mode

impl Timer<TIM21> where
    TIM21: GeneralPurposeTimer
[src]

pub fn tim21<T>(tim: TIM21, timeout: T, rcc: &mut Rcc) -> Self where
    T: Into<Hertz>, 
[src]

Configures a TIM peripheral as a periodic count down timer

pub fn listen(&mut self)[src]

Starts listening

pub fn unlisten(&mut self)[src]

Stops listening

pub fn clear_irq(&mut self)[src]

Clears interrupt flag

pub fn release(self) -> TIM21[src]

Releases the TIM peripheral

pub fn reset(&mut self)[src]

Reset counter

pub fn select_master_mode(
    &mut self,
    variant: <TIM21 as GeneralPurposeTimer>::MasterMode
)
[src]

Select master mode

impl Timer<TIM22> where
    TIM22: GeneralPurposeTimer
[src]

pub fn tim22<T>(tim: TIM22, timeout: T, rcc: &mut Rcc) -> Self where
    T: Into<Hertz>, 
[src]

Configures a TIM peripheral as a periodic count down timer

pub fn listen(&mut self)[src]

Starts listening

pub fn unlisten(&mut self)[src]

Stops listening

pub fn clear_irq(&mut self)[src]

Clears interrupt flag

pub fn release(self) -> TIM22[src]

Releases the TIM peripheral

pub fn reset(&mut self)[src]

Reset counter

pub fn select_master_mode(
    &mut self,
    variant: <TIM22 as GeneralPurposeTimer>::MasterMode
)
[src]

Select master mode

Trait Implementations

impl CountDown for Timer<SYST>[src]

type Time = Hertz

The unit of time used by this timer

impl CountDown for Timer<TIM2>[src]

type Time = Hertz

The unit of time used by this timer

impl CountDown for Timer<TIM3>[src]

type Time = Hertz

The unit of time used by this timer

impl CountDown for Timer<TIM21>[src]

type Time = Hertz

The unit of time used by this timer

impl CountDown for Timer<TIM22>[src]

type Time = Hertz

The unit of time used by this timer

impl Periodic for Timer<SYST>[src]

impl Periodic for Timer<TIM2>[src]

impl Periodic for Timer<TIM3>[src]

impl Periodic for Timer<TIM21>[src]

impl Periodic for Timer<TIM22>[src]

Auto Trait Implementations

impl<TIM> Send for Timer<TIM> where
    TIM: Send

impl<TIM> Sync for Timer<TIM> where
    TIM: Sync

impl<TIM> Unpin for Timer<TIM> where
    TIM: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.