Struct r3_core::kernel::timer::TimerDefiner
source · pub struct TimerDefiner<System> { /* private fields */ }
Expand description
The definer (static builder) for TimerRef
.
Implementations§
source§impl<System: KernelTimer> TimerDefiner<System>
impl<System: KernelTimer> TimerDefiner<System>
sourcepub const fn start<C: IntoClosureConst>(self, start: C) -> Self
pub const fn start<C: IntoClosureConst>(self, start: C) -> Self
[Required] Specify the timer’s entry point. It will be called in an interrupt context.
sourcepub const fn active(self, active: bool) -> Self
pub const fn active(self, active: bool) -> Self
Specify whether the timer should be started at system startup.
Defaults to false
(don’t activate).
sourcepub const fn delay(self, delay: Duration) -> Self
pub const fn delay(self, delay: Duration) -> Self
Specify the initial delay.
Defaults to None
(infinity; the timer will never fire).
sourcepub const fn period(self, period: Duration) -> Self
pub const fn period(self, period: Duration) -> Self
Specify the initial period.
Defaults to None
(infinity; the timer will stop firing after the next
tick).
sourcepub const fn finish<C: CfgTimer<System = System>>(
self,
c: &mut Cfg<'_, C>
) -> StaticTimer<System>
pub const fn finish<C: CfgTimer<System = System>>( self, c: &mut Cfg<'_, C> ) -> StaticTimer<System>
Complete the definition of a mutex, returning a reference to the mutex.
Trait Implementations§
source§impl<System: KernelTimer> ExecutableDefiner for TimerDefiner<System>
impl<System: KernelTimer> ExecutableDefiner for TimerDefiner<System>
Auto Trait Implementations§
impl<System> RefUnwindSafe for TimerDefiner<System>
impl<System> Send for TimerDefiner<System>
impl<System> Sync for TimerDefiner<System>
impl<System> Unpin for TimerDefiner<System>
impl<System> UnwindSafe for TimerDefiner<System>
Blanket Implementations§
source§impl<T> ExecutableDefinerExt for Twhere
T: ExecutableDefiner,
impl<T> ExecutableDefinerExt for Twhere T: ExecutableDefiner,
source§const fn start_with_bind<Binder, Func>(self, binder: Binder, func: Func) -> Twhere
Func: FnBind<Binder, Output = ()>,
const fn start_with_bind<Binder, Func>(self, binder: Binder, func: Func) -> Twhere Func: FnBind<Binder, Output = ()>,
Use the specified function with dependency as the entry point of the
executable object being defined.