pub struct Timer { /* private fields */ }
Expand description
A FreeRTOS software timer.
Note that all operations on a timer are processed by a FreeRTOS internal task that receives messages in a queue. Every operation has an associated waiting time for that queue to get unblocked.
Implementations§
Source§impl Timer
impl Timer
Sourcepub fn new<D: DurationTicks>(period: D) -> TimerBuilder<D>
pub fn new<D: DurationTicks>(period: D) -> TimerBuilder<D>
Create a new timer builder.
Sourcepub fn start<D: DurationTicks>(
&self,
block_time: D,
) -> Result<(), FreeRtosError>
pub fn start<D: DurationTicks>( &self, block_time: D, ) -> Result<(), FreeRtosError>
Start the timer.
Sourcepub fn stop<D: DurationTicks>(&self, block_time: D) -> Result<(), FreeRtosError>
pub fn stop<D: DurationTicks>(&self, block_time: D) -> Result<(), FreeRtosError>
Stop the timer.
Sourcepub fn change_period<D: DurationTicks>(
&self,
block_time: D,
new_period: D,
) -> Result<(), FreeRtosError>
pub fn change_period<D: DurationTicks>( &self, block_time: D, new_period: D, ) -> Result<(), FreeRtosError>
Change the period of the timer.
Trait Implementations§
Auto Trait Implementations§
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