pub struct LowPowerTimer<LPTIM> { /* private fields */ }
Expand description

A low power hardware timer

Supported things:

  • Compare match
  • Auto reload matches

Implementations

Consume the LPTIM and produce a LowPowerTimer that encapsulates said LPTIM.

config contains details about the desired configuration for the LowPowerTimer

Panics

This function panics if the value of ARR is less than or equal to CMP, and if the clock source is HSI16, LSI, or LSE and that clock is not enabled.

Enable interrupts for the specified event

Disable interrupts for the specified event

Check if the specified event has been triggered for this LowPowerTimer.

If this function returns true for an Event that this LowPowerTimer is listening for, LowPowerTimer::clear_event_flag must be called for that event to prevent the interrupt from looping eternally. This is not done in a single function to avoid using a mutable reference for an operation that does not require it.

Clear the interrupt flag for the specified event

Set the compare match field for this LowPowerTimer

Set auto reload register has to be used after enabling of lptim

Get the current counter value for this LowPowerTimer

Get the value of the ARR register for this LowPowerTimer

Consume the LPTIM and produce a LowPowerTimer that encapsulates said LPTIM.

config contains details about the desired configuration for the LowPowerTimer

Panics

This function panics if the value of ARR is less than or equal to CMP, and if the clock source is HSI16, LSI, or LSE and that clock is not enabled.

Enable interrupts for the specified event

Disable interrupts for the specified event

Check if the specified event has been triggered for this LowPowerTimer.

If this function returns true for an Event that this LowPowerTimer is listening for, LowPowerTimer::clear_event_flag must be called for that event to prevent the interrupt from looping eternally. This is not done in a single function to avoid using a mutable reference for an operation that does not require it.

Clear the interrupt flag for the specified event

Set the compare match field for this LowPowerTimer

Set auto reload register has to be used after enabling of lptim

Get the current counter value for this LowPowerTimer

Get the value of the ARR register for this LowPowerTimer

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.