pub struct GenericTimerCtl<'a> { /* private fields */ }
Expand description
Driver for the CNTCTLBase block.
Implementations§
Source§impl<'a> GenericTimerCtl<'a>
impl<'a> GenericTimerCtl<'a>
Sourcepub fn new(regs: UniqueMmioPointer<'a, CntCtlBase>) -> Self
pub fn new(regs: UniqueMmioPointer<'a, CntCtlBase>) -> Self
Creates new instance.
Sourcepub fn set_frequency(&mut self, frequency: u32)
pub fn set_frequency(&mut self, frequency: u32)
Sets counter frequency in Hz.
Sourcepub fn non_secure_access(&self, index: usize) -> bool
pub fn non_secure_access(&self, index: usize) -> bool
Gets non-secure access state.
Sourcepub fn set_non_secure_access(&mut self, index: usize, enable: bool)
pub fn set_non_secure_access(&mut self, index: usize, enable: bool)
Provides the highest-level control of whether frames CNTBaseN and CNTEL0BaseN are accessible by Non-secure accesses.
Sourcepub fn access_control(&self, index: usize) -> CntAcr
pub fn access_control(&self, index: usize) -> CntAcr
Gets current top-level access controls for the elements of a timer frame.
Sourcepub fn set_access_control(&mut self, index: usize, cntacr: CntAcr)
pub fn set_access_control(&mut self, index: usize, cntacr: CntAcr)
Sets top-level access controls for the elements of a timer frame.
Sourcepub fn virtual_offset(&self, index: usize) -> u64
pub fn virtual_offset(&self, index: usize) -> u64
Gets the 64-bit virtual offset for frame CNTBase.
Sourcepub fn set_virtual_offset(&mut self, index: usize, offset: u64)
pub fn set_virtual_offset(&mut self, index: usize, offset: u64)
Sets the 64-bit virtual offset for frame CNTBase. This is the offset between real time and virtual time.
Auto Trait Implementations§
impl<'a> Freeze for GenericTimerCtl<'a>
impl<'a> RefUnwindSafe for GenericTimerCtl<'a>
impl<'a> Send for GenericTimerCtl<'a>
impl<'a> !Sync for GenericTimerCtl<'a>
impl<'a> Unpin for GenericTimerCtl<'a>
impl<'a> UnwindSafe for GenericTimerCtl<'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