Trait r3::kernel::raw::KernelTimer

source ·
pub unsafe trait KernelTimer: KernelBase {
    type RawTimerId: Id;

    // Required methods
    unsafe fn raw_timer_start(
        this: Self::RawTimerId
    ) -> Result<(), StartTimerError>;
    unsafe fn raw_timer_stop(
        this: Self::RawTimerId
    ) -> Result<(), StopTimerError>;
    unsafe fn raw_timer_set_delay(
        this: Self::RawTimerId,
        delay: Option<Duration>
    ) -> Result<(), SetTimerDelayError>;
    unsafe fn raw_timer_set_period(
        this: Self::RawTimerId,
        period: Option<Duration>
    ) -> Result<(), SetTimerPeriodError>;
}
Expand description

Provides access to the timer API exposed by a kernel.

Safety

See the Safety section of the module documentation.

Required Associated Types§

source

type RawTimerId: Id

The type to identify timers.

Required Methods§

source

unsafe fn raw_timer_start(this: Self::RawTimerId) -> Result<(), StartTimerError>

Implements Timer::start.

Safety

See the Safety section of the module documentation.

source

unsafe fn raw_timer_stop(this: Self::RawTimerId) -> Result<(), StopTimerError>

Implements Timer::stop.

Safety

See the Safety section of the module documentation.

source

unsafe fn raw_timer_set_delay( this: Self::RawTimerId, delay: Option<Duration> ) -> Result<(), SetTimerDelayError>

Implements Timer::set_delay.

Safety

See the Safety section of the module documentation.

source

unsafe fn raw_timer_set_period( this: Self::RawTimerId, period: Option<Duration> ) -> Result<(), SetTimerPeriodError>

Implements Timer::set_period.

Safety

See the Safety section of the module documentation.

Implementors§