Struct MonoTimer64

Source
pub struct MonoTimer64<TIM, const FREQ: u32> { /* private fields */ }
Expand description

Extended TIM15/16 (16-bits) to 64 bits

Methods from Deref<Target = FTimer<TIM, FREQ>>§

Source

pub fn configure(&mut self, clocks: &Clocks)

Calculate prescaler depending on Clocks state

Source

pub fn set_master_mode(&mut self, mode: TIM::Mms)

Trait Implementations§

Source§

impl<TIM, const FREQ: u32> Deref for MonoTimer64<TIM, FREQ>

Source§

type Target = FTimer<TIM, FREQ>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<TIM, const FREQ: u32> DerefMut for MonoTimer64<TIM, FREQ>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<TIM, const FREQ: u32> Monotonic for MonoTimer64<TIM, FREQ>
where TIM: Instance + General + WithPwm, TIM::Width: ArrWidth, u64: From<TIM::Width>, u32: From<TIM::Width>,

Use Compare channel 1 for Monotonic

Source§

const DISABLE_INTERRUPT_ON_EMPTY_QUEUE: bool = false

This tells RTIC if it should disable the interrupt bound to the monotonic if there are no scheduled tasks. One may want to set this to false if one is using the on_interrupt method to perform housekeeping and need overflow interrupts to happen, such as when extending a 16 bit timer to 32/64 bits, even if there are no scheduled tasks.
Source§

type Instant = Instant<u64, 1, FREQ>

The type for instant, defining an instant in time. Read more
Source§

type Duration = Duration<u64, 1, FREQ>

The type for duration, defining an duration of time. Read more
Source§

fn now(&mut self) -> Self::Instant

Get the current time.
Source§

fn zero() -> Self::Instant

The time at time zero. Used by RTIC before the monotonic has been initialized.
Source§

unsafe fn reset(&mut self)

Optionally resets the counter to zero for a fixed baseline in a system. Read more
Source§

fn set_compare(&mut self, instant: Self::Instant)

Set the compare value of the timer interrupt. Read more
Source§

fn clear_compare_flag(&mut self)

Clear the compare interrupt flag.
Source§

fn on_interrupt(&mut self)

Optional. Commonly used for performing housekeeping of a timer when it has been extended, e.g. a 16 bit timer extended to 32/64 bits. This will be called at the end of the interrupt handler after all other operations have finished.
Source§

fn enable_timer(&mut self)

Optional. This is used to save power, this is called when the Monotonic interrupt is enabled.
Source§

fn disable_timer(&mut self)

Optional. This is used to save power, this is called when the Monotonic interrupt is disabled.

Auto Trait Implementations§

§

impl<TIM, const FREQ: u32> Freeze for MonoTimer64<TIM, FREQ>
where TIM: Freeze,

§

impl<TIM, const FREQ: u32> RefUnwindSafe for MonoTimer64<TIM, FREQ>
where TIM: RefUnwindSafe,

§

impl<TIM, const FREQ: u32> Send for MonoTimer64<TIM, FREQ>
where TIM: Send,

§

impl<TIM, const FREQ: u32> Sync for MonoTimer64<TIM, FREQ>
where TIM: Sync,

§

impl<TIM, const FREQ: u32> Unpin for MonoTimer64<TIM, FREQ>
where TIM: Unpin,

§

impl<TIM, const FREQ: u32> UnwindSafe for MonoTimer64<TIM, FREQ>
where TIM: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.