[][src]Struct sunrise_kernel::timer::IRQTimer

pub struct IRQTimer {
    every_ns: usize,
    irq_period_ns: u64,
    parent_event: IRQEvent,
    reset_value: usize,
    countdown_value: AtomicUsize,
}

A stream of event that trigger every ns amount of nanoseconds, by counting interruptions.

Fields

every_ns: usize

Approximation of number of ns spent between triggers.

irq_period_ns: u64

IRQ event period in nanoseconds.

parent_event: IRQEvent

The IRQ that we wait on.

reset_value: usize

The reset value of .countdown_value.

countdown_value: AtomicUsize

Number of IRQ triggers to wait for. Derived from .every_ns. This is the exact time amout that is used.

Implementations

impl IRQTimer[src]

pub fn new(ns: usize, irq: u8, irq_period_ns: u64) -> Self[src]

Create a new IRQ timer instance from the time to wait (in ns), the irq number and irq event period (in ns).

Trait Implementations

impl Debug for IRQTimer[src]

impl Waitable for IRQTimer[src]

Auto Trait Implementations

impl !RefUnwindSafe for IRQTimer

impl Send for IRQTimer

impl Sync for IRQTimer

impl Unpin for IRQTimer

impl !UnwindSafe for IRQTimer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.