pub struct PeriodicTimer<'d, Dm: DriverMode> { /* private fields */ }
Available on crate feature
unstable
only.Expand description
A periodic timer.
Implementations§
Source§impl<'d> PeriodicTimer<'d, Blocking>
impl<'d> PeriodicTimer<'d, Blocking>
Sourcepub fn new(
inner: impl Peripheral<P = impl Timer> + 'd,
) -> PeriodicTimer<'d, Blocking>
pub fn new( inner: impl Peripheral<P = impl Timer> + 'd, ) -> PeriodicTimer<'d, Blocking>
Construct a new instance of PeriodicTimer
.
Source§impl<Dm> PeriodicTimer<'_, Dm>where
Dm: DriverMode,
impl<Dm> PeriodicTimer<'_, Dm>where
Dm: DriverMode,
Sourcepub fn set_interrupt_handler(&mut self, handler: InterruptHandler)
pub fn set_interrupt_handler(&mut self, handler: InterruptHandler)
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 enable_interrupt(&mut self, enable: bool)
pub fn enable_interrupt(&mut self, enable: bool)
Enable/disable listening for interrupts
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,
impl<Dm> InterruptConfigurable for PeriodicTimer<'_, Dm>where
Dm: DriverMode,
Source§fn set_interrupt_handler(&mut self, handler: InterruptHandler)
fn set_interrupt_handler(&mut self, handler: InterruptHandler)
Registers an interrupt handler for the peripheral. Read more