pub struct TimerHandle(/* private fields */);Expand description
Wraps the reference to a FreeRTOS’s timer handle, exposing an API to safely communicate with FreeRTOS and perform actions over the corresponding Timer.
Implementations§
Source§impl TimerHandle
impl TimerHandle
Sourcepub fn start(&self) -> Result<(), FreeRtosError>
pub fn start(&self) -> Result<(), FreeRtosError>
Start the timer.
Sourcepub fn start_from_isr(
&self,
context: &mut InterruptContext,
) -> Result<(), FreeRtosError>
pub fn start_from_isr( &self, context: &mut InterruptContext, ) -> Result<(), FreeRtosError>
Start the timer from an interrupt.
Sourcepub fn stop(&self) -> Result<(), FreeRtosError>
pub fn stop(&self) -> Result<(), FreeRtosError>
Stop the timer.
Sourcepub fn change_period(&self, new_period: Duration) -> Result<(), FreeRtosError>
pub fn change_period(&self, new_period: Duration) -> Result<(), FreeRtosError>
Change the period of the timer.
Trait Implementations§
Source§impl Clone for TimerHandle
impl Clone for TimerHandle
Source§fn clone(&self) -> TimerHandle
fn clone(&self) -> TimerHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TimerHandle
impl Debug for TimerHandle
impl Copy for TimerHandle
Auto Trait Implementations§
impl Freeze for TimerHandle
impl RefUnwindSafe for TimerHandle
impl !Send for TimerHandle
impl !Sync for TimerHandle
impl Unpin for TimerHandle
impl UnwindSafe for TimerHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more