pub trait InterruptDrivenTimer {
// Required methods
fn enable_interrupt(&mut self);
fn start<T: Into<NanosDurationU32>>(&mut self, timeout: T);
fn wait(&mut self) -> Result<(), Infallible>;
fn disable_interrupt(&mut self);
}
Expand description
Specifies a timer that can enable & disable an interrupt that fires when the timer expires
Required Methods§
Sourcefn enable_interrupt(&mut self)
fn enable_interrupt(&mut self)
Enable the timer interrupt
Sourcefn start<T: Into<NanosDurationU32>>(&mut self, timeout: T)
fn start<T: Into<NanosDurationU32>>(&mut self, timeout: T)
Start the timer with a given timeout in nanoseconds
Sourcefn wait(&mut self) -> Result<(), Infallible>
fn wait(&mut self) -> Result<(), Infallible>
Wait for the timer to finish counting down without blocking.
Sourcefn disable_interrupt(&mut self)
fn disable_interrupt(&mut self)
Disable the timer interrupt
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.