Skip to main content

TimerInterface

Trait TimerInterface 

Source
pub trait TimerInterface {
    // Required methods
    fn enable(&mut self);
    fn frequency(&self) -> u32;
    fn timer_value(&self) -> u32;
}
Expand description

Interface for accessing common timer registers.

Required Methods§

Source

fn enable(&mut self)

Enables timer

Source

fn frequency(&self) -> u32

Returns the frequency in Hz.

Source

fn timer_value(&self) -> u32

Returns the down-counter value.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl TimerInterface for El2VirtualTimer

Available on crate feature el2 and (AArch64 or crate feature fakes) only.
Source§

impl TimerInterface for HypervisorPhysicalTimer

Available on crate feature el2 and (AArch64 or crate feature fakes) only.
Source§

impl TimerInterface for PhysicalSecureTimer

Available on crate feature el1 and (AArch64 or crate feature fakes) only.
Source§

impl TimerInterface for PhysicalTimer

Available on AArch64 or crate feature fakes only.
Source§

impl TimerInterface for SecureEl2PhysicalTimer

Available on crate feature el2 and (AArch64 or crate feature fakes) only.
Source§

impl TimerInterface for SecureEl2VirtualTimer

Available on crate feature el2 and (AArch64 or crate feature fakes) only.
Source§

impl TimerInterface for VirtualTimer

Available on AArch64 or crate feature fakes only.
Source§

impl<'a> TimerInterface for MmioTimer<'a>