Struct tm4c123x_hal::timer::Timer

source ·
pub struct Timer<TIM> { /* private fields */ }
Expand description

Hardware timers

Implementations§

source§

impl Timer<TIMER0>

source

pub fn timer0<T>( tim: TIMER0, timeout: T, pc: &PowerControl, clocks: &Clocks ) -> Selfwhere T: Into<Hertz>,

Configures a TIM peripheral as a periodic count down timer

source

pub fn listen(&mut self, event: Event)

Starts listening for an event

source

pub fn unlisten(&mut self, event: Event)

Stops listening for an event

source

pub fn free(self) -> TIMER0

Releases the TIM peripheral

source§

impl Timer<TIMER1>

source

pub fn timer1<T>( tim: TIMER1, timeout: T, pc: &PowerControl, clocks: &Clocks ) -> Selfwhere T: Into<Hertz>,

Configures a TIM peripheral as a periodic count down timer

source

pub fn listen(&mut self, event: Event)

Starts listening for an event

source

pub fn unlisten(&mut self, event: Event)

Stops listening for an event

source

pub fn free(self) -> TIMER1

Releases the TIM peripheral

source§

impl Timer<TIMER2>

source

pub fn timer2<T>( tim: TIMER2, timeout: T, pc: &PowerControl, clocks: &Clocks ) -> Selfwhere T: Into<Hertz>,

Configures a TIM peripheral as a periodic count down timer

source

pub fn listen(&mut self, event: Event)

Starts listening for an event

source

pub fn unlisten(&mut self, event: Event)

Stops listening for an event

source

pub fn free(self) -> TIMER2

Releases the TIM peripheral

source§

impl Timer<TIMER3>

source

pub fn timer3<T>( tim: TIMER3, timeout: T, pc: &PowerControl, clocks: &Clocks ) -> Selfwhere T: Into<Hertz>,

Configures a TIM peripheral as a periodic count down timer

source

pub fn listen(&mut self, event: Event)

Starts listening for an event

source

pub fn unlisten(&mut self, event: Event)

Stops listening for an event

source

pub fn free(self) -> TIMER3

Releases the TIM peripheral

source§

impl Timer<TIMER4>

source

pub fn timer4<T>( tim: TIMER4, timeout: T, pc: &PowerControl, clocks: &Clocks ) -> Selfwhere T: Into<Hertz>,

Configures a TIM peripheral as a periodic count down timer

source

pub fn listen(&mut self, event: Event)

Starts listening for an event

source

pub fn unlisten(&mut self, event: Event)

Stops listening for an event

source

pub fn free(self) -> TIMER4

Releases the TIM peripheral

source§

impl Timer<TIMER5>

source

pub fn timer5<T>( tim: TIMER5, timeout: T, pc: &PowerControl, clocks: &Clocks ) -> Selfwhere T: Into<Hertz>,

Configures a TIM peripheral as a periodic count down timer

source

pub fn listen(&mut self, event: Event)

Starts listening for an event

source

pub fn unlisten(&mut self, event: Event)

Stops listening for an event

source

pub fn free(self) -> TIMER5

Releases the TIM peripheral

source§

impl Timer<WTIMER0>

source

pub fn wtimer0<T>( tim: WTIMER0, timeout: T, pc: &PowerControl, clocks: &Clocks ) -> Selfwhere T: Into<Hertz>,

Configures a TIM peripheral as a periodic count down timer

source

pub fn listen(&mut self, event: Event)

Starts listening for an event

source

pub fn unlisten(&mut self, event: Event)

Stops listening for an event

source

pub fn free(self) -> WTIMER0

Releases the TIM peripheral

source§

impl Timer<WTIMER1>

source

pub fn wtimer1<T>( tim: WTIMER1, timeout: T, pc: &PowerControl, clocks: &Clocks ) -> Selfwhere T: Into<Hertz>,

Configures a TIM peripheral as a periodic count down timer

source

pub fn listen(&mut self, event: Event)

Starts listening for an event

source

pub fn unlisten(&mut self, event: Event)

Stops listening for an event

source

pub fn free(self) -> WTIMER1

Releases the TIM peripheral

source§

impl Timer<WTIMER2>

source

pub fn wtimer2<T>( tim: WTIMER2, timeout: T, pc: &PowerControl, clocks: &Clocks ) -> Selfwhere T: Into<Hertz>,

Configures a TIM peripheral as a periodic count down timer

source

pub fn listen(&mut self, event: Event)

Starts listening for an event

source

pub fn unlisten(&mut self, event: Event)

Stops listening for an event

source

pub fn free(self) -> WTIMER2

Releases the TIM peripheral

source§

impl Timer<WTIMER3>

source

pub fn wtimer3<T>( tim: WTIMER3, timeout: T, pc: &PowerControl, clocks: &Clocks ) -> Selfwhere T: Into<Hertz>,

Configures a TIM peripheral as a periodic count down timer

source

pub fn listen(&mut self, event: Event)

Starts listening for an event

source

pub fn unlisten(&mut self, event: Event)

Stops listening for an event

source

pub fn free(self) -> WTIMER3

Releases the TIM peripheral

source§

impl Timer<WTIMER4>

source

pub fn wtimer4<T>( tim: WTIMER4, timeout: T, pc: &PowerControl, clocks: &Clocks ) -> Selfwhere T: Into<Hertz>,

Configures a TIM peripheral as a periodic count down timer

source

pub fn listen(&mut self, event: Event)

Starts listening for an event

source

pub fn unlisten(&mut self, event: Event)

Stops listening for an event

source

pub fn free(self) -> WTIMER4

Releases the TIM peripheral

source§

impl Timer<WTIMER5>

source

pub fn wtimer5<T>( tim: WTIMER5, timeout: T, pc: &PowerControl, clocks: &Clocks ) -> Selfwhere T: Into<Hertz>,

Configures a TIM peripheral as a periodic count down timer

source

pub fn listen(&mut self, event: Event)

Starts listening for an event

source

pub fn unlisten(&mut self, event: Event)

Stops listening for an event

source

pub fn free(self) -> WTIMER5

Releases the TIM peripheral

Trait Implementations§

source§

impl CountDown for Timer<TIMER0>

§

type Time = Hertz

The unit of time used by this timer
source§

fn start<T>(&mut self, timeout: T)where T: Into<Hertz>,

Starts a new count down
source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
source§

impl CountDown for Timer<TIMER1>

§

type Time = Hertz

The unit of time used by this timer
source§

fn start<T>(&mut self, timeout: T)where T: Into<Hertz>,

Starts a new count down
source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
source§

impl CountDown for Timer<TIMER2>

§

type Time = Hertz

The unit of time used by this timer
source§

fn start<T>(&mut self, timeout: T)where T: Into<Hertz>,

Starts a new count down
source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
source§

impl CountDown for Timer<TIMER3>

§

type Time = Hertz

The unit of time used by this timer
source§

fn start<T>(&mut self, timeout: T)where T: Into<Hertz>,

Starts a new count down
source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
source§

impl CountDown for Timer<TIMER4>

§

type Time = Hertz

The unit of time used by this timer
source§

fn start<T>(&mut self, timeout: T)where T: Into<Hertz>,

Starts a new count down
source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
source§

impl CountDown for Timer<TIMER5>

§

type Time = Hertz

The unit of time used by this timer
source§

fn start<T>(&mut self, timeout: T)where T: Into<Hertz>,

Starts a new count down
source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
source§

impl CountDown for Timer<WTIMER0>

§

type Time = Hertz

The unit of time used by this timer
source§

fn start<T>(&mut self, timeout: T)where T: Into<Hertz>,

Starts a new count down
source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
source§

impl CountDown for Timer<WTIMER1>

§

type Time = Hertz

The unit of time used by this timer
source§

fn start<T>(&mut self, timeout: T)where T: Into<Hertz>,

Starts a new count down
source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
source§

impl CountDown for Timer<WTIMER2>

§

type Time = Hertz

The unit of time used by this timer
source§

fn start<T>(&mut self, timeout: T)where T: Into<Hertz>,

Starts a new count down
source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
source§

impl CountDown for Timer<WTIMER3>

§

type Time = Hertz

The unit of time used by this timer
source§

fn start<T>(&mut self, timeout: T)where T: Into<Hertz>,

Starts a new count down
source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
source§

impl CountDown for Timer<WTIMER4>

§

type Time = Hertz

The unit of time used by this timer
source§

fn start<T>(&mut self, timeout: T)where T: Into<Hertz>,

Starts a new count down
source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
source§

impl CountDown for Timer<WTIMER5>

§

type Time = Hertz

The unit of time used by this timer
source§

fn start<T>(&mut self, timeout: T)where T: Into<Hertz>,

Starts a new count down
source§

fn wait(&mut self) -> Result<(), Void>

Non-blockingly “waits” until the count down finishes Read more
source§

impl Periodic for Timer<TIMER0>

source§

impl Periodic for Timer<TIMER1>

source§

impl Periodic for Timer<TIMER2>

source§

impl Periodic for Timer<TIMER3>

source§

impl Periodic for Timer<TIMER4>

source§

impl Periodic for Timer<TIMER5>

source§

impl Periodic for Timer<WTIMER0>

source§

impl Periodic for Timer<WTIMER1>

source§

impl Periodic for Timer<WTIMER2>

source§

impl Periodic for Timer<WTIMER3>

source§

impl Periodic for Timer<WTIMER4>

source§

impl Periodic for Timer<WTIMER5>

Auto Trait Implementations§

§

impl<TIM> RefUnwindSafe for Timer<TIM>where TIM: RefUnwindSafe,

§

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,

§

impl<TIM> UnwindSafe for Timer<TIM>where TIM: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.