[−][src]Struct stm32l0xx_hal::timer::Timer
Hardware timers
Methods
impl Timer<SYST>
[src]
pub fn syst<T>(syst: SYST, timeout: T, rcc: &mut Rcc) -> Self where
T: Into<Hertz>,
[src]
T: Into<Hertz>,
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>
[src]
pub fn tim2<T>(tim: TIM2, timeout: T, rcc: &mut Rcc) -> Self where
T: Into<Hertz>,
[src]
T: Into<Hertz>,
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
impl Timer<TIM3>
[src]
pub fn tim3<T>(tim: TIM3, timeout: T, rcc: &mut Rcc) -> Self where
T: Into<Hertz>,
[src]
T: Into<Hertz>,
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
impl Timer<TIM21>
[src]
pub fn tim21<T>(tim: TIM21, timeout: T, rcc: &mut Rcc) -> Self where
T: Into<Hertz>,
[src]
T: Into<Hertz>,
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
impl Timer<TIM22>
[src]
pub fn tim22<T>(tim: TIM22, timeout: T, rcc: &mut Rcc) -> Self where
T: Into<Hertz>,
[src]
T: Into<Hertz>,
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
Trait Implementations
impl CountDown for Timer<SYST>
[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>,
fn wait(&mut self) -> Result<(), Void>
[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>,
fn wait(&mut self) -> Result<(), Void>
[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>,
fn wait(&mut self) -> Result<(), Void>
[src]
impl CountDown for Timer<TIM21>
[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>,
fn wait(&mut self) -> Result<(), Void>
[src]
impl CountDown for Timer<TIM22>
[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>,
fn wait(&mut self) -> Result<(), Void>
[src]
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> Unpin for Timer<TIM> where
TIM: Unpin,
TIM: Unpin,
impl<TIM> Send for Timer<TIM> where
TIM: Send,
TIM: Send,
impl<TIM> Sync for Timer<TIM> where
TIM: Sync,
TIM: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self