pub struct MmioTimer<'a> { /* private fields */ }Expand description
TimerInterface implementation of the MMIO based physical or virtual timer instance of the
CNTBase block.
Trait Implementations§
Source§impl<'a> TimerInterface for MmioTimer<'a>
impl<'a> TimerInterface for MmioTimer<'a>
Source§fn timer_value(&self) -> i32
fn timer_value(&self) -> i32
Returns the down-counter value.
Source§fn enable_interrupt(&mut self, enabled: bool)
fn enable_interrupt(&mut self, enabled: bool)
Unmasks / masks interrupts for the counter.
Source§fn compare_value(&self) -> u64
fn compare_value(&self) -> u64
Returns the compare value.
Source§fn set_timer_value(&mut self, timer_value: i32)
fn set_timer_value(&mut self, timer_value: i32)
Sets timer value. This programs the compare value relative to the physical counter, which
affects the value returned by
TimerInterface::compare_value().
Setting a negative value will trigger an interrupt, if enabled.Source§fn set_compare_value(&mut self, compare_value: u64)
fn set_compare_value(&mut self, compare_value: u64)
Sets the compare value. This also affects the down-counter value queried using
TimerInterface::timer_value().Auto Trait Implementations§
impl<'a> !Sync for MmioTimer<'a>
impl<'a> Freeze for MmioTimer<'a>
impl<'a> RefUnwindSafe for MmioTimer<'a>
impl<'a> Send for MmioTimer<'a>
impl<'a> Unpin for MmioTimer<'a>
impl<'a> UnsafeUnpin for MmioTimer<'a>
impl<'a> UnwindSafe for MmioTimer<'a>
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