pub struct PeriodicTimer<'d, Dm: DriverMode> { /* private fields */ }Expand description
A periodic timer.
Implementations§
Source§impl<'d> PeriodicTimer<'d, Blocking>
impl<'d> PeriodicTimer<'d, Blocking>
Sourcepub fn new(
inner: impl Timer + Into<AnyTimer<'d>>,
) -> PeriodicTimer<'d, Blocking>
pub fn new( inner: impl Timer + Into<AnyTimer<'d>>, ) -> PeriodicTimer<'d, Blocking>
Construct a new instance of PeriodicTimer.
Sourcepub fn into_async(self) -> PeriodicTimer<'d, Async>
pub fn into_async(self) -> PeriodicTimer<'d, Async>
Converts the driver to Async mode.
Source§impl<'d> PeriodicTimer<'d, Async>
impl<'d> PeriodicTimer<'d, Async>
Sourcepub fn into_blocking(self) -> PeriodicTimer<'d, Blocking>
pub fn into_blocking(self) -> PeriodicTimer<'d, Blocking>
Converts the driver to Blocking mode.
Sourcepub async fn wait_async(&mut self)
pub async fn wait_async(&mut self)
Wait for at least the time interval loaded by PeriodicTimer::start.
Once the time period elapses, the underlying timer hardware automatically schedules the next timeout.
Source§impl<Dm> PeriodicTimer<'_, Dm>where
Dm: DriverMode,
impl<Dm> PeriodicTimer<'_, Dm>where
Dm: DriverMode,
Sourcepub fn set_interrupt_handler(&mut self, handler: InterruptHandler)
Available on crate feature unstable only.
pub fn set_interrupt_handler(&mut self, handler: InterruptHandler)
unstable only.Set the interrupt handler
Note that this will replace any previously set interrupt handler
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn clear_interrupt(&mut self)
pub fn clear_interrupt(&mut self)
Clear the interrupt flag
Trait Implementations§
Source§impl<Dm> InterruptConfigurable for PeriodicTimer<'_, Dm>where
Dm: DriverMode,
Available on crate feature unstable only.
impl<Dm> InterruptConfigurable for PeriodicTimer<'_, Dm>where
Dm: DriverMode,
Available on crate feature
unstable only.Source§fn set_interrupt_handler(&mut self, handler: InterruptHandler)
fn set_interrupt_handler(&mut self, handler: InterruptHandler)
Registers an interrupt handler for the peripheral on the current core. Read more