[−][src]Struct stm32f4xx_hal::timer::Timer
Hardware timers
Methods
impl Timer<SYST>[src]
pub fn syst<T>(syst: SYST, timeout: T, clocks: Clocks) -> Self where
T: Into<Hertz>, [src]
T: Into<Hertz>,
Configures the SYST clock 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
impl Timer<TIM1>[src]
pub fn tim1<T>(tim: TIM1, timeout: T, clocks: Clocks) -> 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
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
pub fn clear_interrupt(&mut self, event: Event)[src]
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn unlisten(&mut self, event: Event)[src]
Stops listening for an event
pub fn release(self) -> TIM1[src]
Releases the TIM peripheral
impl Timer<TIM5>[src]
pub fn tim5<T>(tim: TIM5, timeout: T, clocks: Clocks) -> 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
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
pub fn clear_interrupt(&mut self, event: Event)[src]
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn unlisten(&mut self, event: Event)[src]
Stops listening for an event
pub fn release(self) -> TIM5[src]
Releases the TIM peripheral
impl Timer<TIM9>[src]
pub fn tim9<T>(tim: TIM9, timeout: T, clocks: Clocks) -> 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
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
pub fn clear_interrupt(&mut self, event: Event)[src]
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn unlisten(&mut self, event: Event)[src]
Stops listening for an event
pub fn release(self) -> TIM9[src]
Releases the TIM peripheral
impl Timer<TIM11>[src]
pub fn tim11<T>(tim: TIM11, timeout: T, clocks: Clocks) -> 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
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
pub fn clear_interrupt(&mut self, event: Event)[src]
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn unlisten(&mut self, event: Event)[src]
Stops listening for an event
pub fn release(self) -> TIM11[src]
Releases the TIM peripheral
impl Timer<TIM2>[src]
pub fn tim2<T>(tim: TIM2, timeout: T, clocks: Clocks) -> 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
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
pub fn clear_interrupt(&mut self, event: Event)[src]
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn unlisten(&mut self, event: Event)[src]
Stops listening for an event
pub fn release(self) -> TIM2[src]
Releases the TIM peripheral
impl Timer<TIM3>[src]
pub fn tim3<T>(tim: TIM3, timeout: T, clocks: Clocks) -> 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
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
pub fn clear_interrupt(&mut self, event: Event)[src]
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn unlisten(&mut self, event: Event)[src]
Stops listening for an event
pub fn release(self) -> TIM3[src]
Releases the TIM peripheral
impl Timer<TIM4>[src]
pub fn tim4<T>(tim: TIM4, timeout: T, clocks: Clocks) -> 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
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
pub fn clear_interrupt(&mut self, event: Event)[src]
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn unlisten(&mut self, event: Event)[src]
Stops listening for an event
pub fn release(self) -> TIM4[src]
Releases the TIM peripheral
impl Timer<TIM10>[src]
pub fn tim10<T>(tim: TIM10, timeout: T, clocks: Clocks) -> 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
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
pub fn clear_interrupt(&mut self, event: Event)[src]
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn unlisten(&mut self, event: Event)[src]
Stops listening for an event
pub fn release(self) -> TIM10[src]
Releases the TIM peripheral
impl Timer<TIM6>[src]
pub fn tim6<T>(tim: TIM6, timeout: T, clocks: Clocks) -> 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
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
pub fn clear_interrupt(&mut self, event: Event)[src]
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn unlisten(&mut self, event: Event)[src]
Stops listening for an event
pub fn release(self) -> TIM6[src]
Releases the TIM peripheral
impl Timer<TIM7>[src]
pub fn tim7<T>(tim: TIM7, timeout: T, clocks: Clocks) -> 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
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
pub fn clear_interrupt(&mut self, event: Event)[src]
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn unlisten(&mut self, event: Event)[src]
Stops listening for an event
pub fn release(self) -> TIM7[src]
Releases the TIM peripheral
impl Timer<TIM8>[src]
pub fn tim8<T>(tim: TIM8, timeout: T, clocks: Clocks) -> 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
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
pub fn clear_interrupt(&mut self, event: Event)[src]
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn unlisten(&mut self, event: Event)[src]
Stops listening for an event
pub fn release(self) -> TIM8[src]
Releases the TIM peripheral
impl Timer<TIM12>[src]
pub fn tim12<T>(tim: TIM12, timeout: T, clocks: Clocks) -> 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
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
pub fn clear_interrupt(&mut self, event: Event)[src]
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn unlisten(&mut self, event: Event)[src]
Stops listening for an event
pub fn release(self) -> TIM12[src]
Releases the TIM peripheral
impl Timer<TIM13>[src]
pub fn tim13<T>(tim: TIM13, timeout: T, clocks: Clocks) -> 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
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
pub fn clear_interrupt(&mut self, event: Event)[src]
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn unlisten(&mut self, event: Event)[src]
Stops listening for an event
pub fn release(self) -> TIM13[src]
Releases the TIM peripheral
impl Timer<TIM14>[src]
pub fn tim14<T>(tim: TIM14, timeout: T, clocks: Clocks) -> 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
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
pub fn clear_interrupt(&mut self, event: Event)[src]
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn unlisten(&mut self, event: Event)[src]
Stops listening for an event
pub fn release(self) -> TIM14[src]
Releases the TIM peripheral
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<TIM1>[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<TIM7>[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<TIM8>[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<TIM12>[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<TIM13>[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<TIM14>[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<TIM5>[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<TIM9>[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<TIM11>[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<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>,
fn wait(&mut self) -> Result<(), Void>[src]
impl CountDown for Timer<TIM10>[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<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>,
fn wait(&mut self) -> Result<(), Void>[src]
impl Periodic for Timer<SYST>[src]
impl Periodic for Timer<TIM1>[src]
impl Periodic for Timer<TIM7>[src]
impl Periodic for Timer<TIM8>[src]
impl Periodic for Timer<TIM12>[src]
impl Periodic for Timer<TIM13>[src]
impl Periodic for Timer<TIM14>[src]
impl Periodic for Timer<TIM5>[src]
impl Periodic for Timer<TIM9>[src]
impl Periodic for Timer<TIM11>[src]
impl Periodic for Timer<TIM2>[src]
impl Periodic for Timer<TIM3>[src]
impl Periodic for Timer<TIM4>[src]
impl Periodic for Timer<TIM10>[src]
impl Periodic for Timer<TIM6>[src]
Auto Trait Implementations
impl<TIM> Send for Timer<TIM> where
TIM: Send,
TIM: Send,
impl<TIM> Sync for Timer<TIM> where
TIM: Sync,
TIM: Sync,
impl<TIM> Unpin for Timer<TIM> where
TIM: Unpin,
TIM: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
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> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
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> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,