pub struct El2PhysicalTimer(/* private fields */);
Expand description
Represents our Physical Timer when we are running at EL2.
Implementations§
Source§impl El2PhysicalTimer
impl El2PhysicalTimer
Sourcepub unsafe fn new() -> El2PhysicalTimer
pub unsafe fn new() -> El2PhysicalTimer
Create an EL1 Generic Timer handle
§Safety
Only create one of these at any given time, as they access shared mutable state within the processor and do read-modify-writes on that state.
Sourcepub fn frequency_hz_set(&mut self, new_frequency_hz: u32)
pub fn frequency_hz_set(&mut self, new_frequency_hz: u32)
Set frequency
Sets the frequency, in Hz, that the counters are incrementing at. You might need to call this if your system doesn’t initialise the frequency value to something appropriate, or if you change the clock speed of the timer.
Trait Implementations§
Source§impl GenericTimer for El2PhysicalTimer
impl GenericTimer for El2PhysicalTimer
Source§fn frequency_hz(&self) -> u32
fn frequency_hz(&self) -> u32
Get the timer frequency
Source§fn counter_compare(&self) -> u64
fn counter_compare(&self) -> u64
Get the counter compare value.
Source§fn counter_compare_set(&mut self, value: u64)
fn counter_compare_set(&mut self, value: u64)
Set the counter compare value. Read more
Source§fn countdown_set(&mut self, duration_ticks: u32)
fn countdown_set(&mut self, duration_ticks: u32)
Set the value of the count-down timer. Read more
Source§fn interrupt_masked(&self) -> bool
fn interrupt_masked(&self) -> bool
Is this timer’s interrupt masked?
Source§fn interrupt_mask(&mut self, mask: bool)
fn interrupt_mask(&mut self, mask: bool)
Mask (or unmask) this timer’s interrupt.
Source§fn interrupt_status(&self) -> bool
fn interrupt_status(&self) -> bool
Has this timer’s interrupt fired?
Source§fn delay_ticks(&mut self, ticks: u32)
fn delay_ticks(&mut self, ticks: u32)
Wait for some number of clock ticks
Auto Trait Implementations§
impl Freeze for El2PhysicalTimer
impl RefUnwindSafe for El2PhysicalTimer
impl Send for El2PhysicalTimer
impl Sync for El2PhysicalTimer
impl Unpin for El2PhysicalTimer
impl UnwindSafe for El2PhysicalTimer
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