#[repr(transparent)]pub struct MtimeCtrl(pub u32);
Expand description
Control register for the RISC-V 64-bit Machine-mode timer. This timer is only present in the Secure SIO, so is only accessible to an Arm core in Secure mode or a RISC-V core in Machine mode. Note whilst this timer follows the RISC-V privileged specification, it is equally usable by the Arm cores. The interrupts are routed to normal system-level interrupt lines as well as to the MIP.MTIP inputs on the RISC-V cores.
Tuple Fields§
§0: u32
Implementations§
source§impl MtimeCtrl
impl MtimeCtrl
sourcepub const fn en(&self) -> bool
pub const fn en(&self) -> bool
Timer enable bit. When 0, the timer will not increment automatically.
sourcepub fn set_en(&mut self, val: bool)
pub fn set_en(&mut self, val: bool)
Timer enable bit. When 0, the timer will not increment automatically.
sourcepub const fn fullspeed(&self) -> bool
pub const fn fullspeed(&self) -> bool
If 1, increment the timer every cycle (i.e. run directly from the system clock), rather than incrementing on the system-level timer tick input.
sourcepub fn set_fullspeed(&mut self, val: bool)
pub fn set_fullspeed(&mut self, val: bool)
If 1, increment the timer every cycle (i.e. run directly from the system clock), rather than incrementing on the system-level timer tick input.
sourcepub const fn dbgpause_core0(&self) -> bool
pub const fn dbgpause_core0(&self) -> bool
If 1, the timer pauses when core 0 is in the debug halt state.
sourcepub fn set_dbgpause_core0(&mut self, val: bool)
pub fn set_dbgpause_core0(&mut self, val: bool)
If 1, the timer pauses when core 0 is in the debug halt state.
sourcepub const fn dbgpause_core1(&self) -> bool
pub const fn dbgpause_core1(&self) -> bool
If 1, the timer pauses when core 1 is in the debug halt state.
sourcepub fn set_dbgpause_core1(&mut self, val: bool)
pub fn set_dbgpause_core1(&mut self, val: bool)
If 1, the timer pauses when core 1 is in the debug halt state.
Trait Implementations§
impl Copy for MtimeCtrl
impl Eq for MtimeCtrl
impl StructuralPartialEq for MtimeCtrl
Auto Trait Implementations§
impl Freeze for MtimeCtrl
impl RefUnwindSafe for MtimeCtrl
impl Send for MtimeCtrl
impl Sync for MtimeCtrl
impl Unpin for MtimeCtrl
impl UnwindSafe for MtimeCtrl
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)