pub struct CLINT;Expand description
CLINT peripheral
Implementations§
Source§impl CLINT
impl CLINT
Sourcepub fn is_interrupting() -> bool
pub fn is_interrupting() -> bool
Returns true if a machine timer OR software interrupt is pending.
Sourcepub fn is_enabled() -> bool
pub fn is_enabled() -> bool
Returns true if machine timer OR software interrupts are enabled.
Sourcepub unsafe fn enable()
pub unsafe fn enable()
Enables machine timer AND software interrupts to allow the CLINT to trigger interrupts.
§Safety
Enabling the CLINT may break mask-based critical sections.
Sourcepub fn disable()
pub fn disable()
Disables machine timer AND software interrupts to prevent the CLINT from triggering interrupts.
Sourcepub fn mswi_is_interrupting() -> bool
pub fn mswi_is_interrupting() -> bool
Returns true if a machine software interrupt is pending.
Sourcepub fn mswi_is_enabled() -> bool
pub fn mswi_is_enabled() -> bool
Returns true if Machine Software Interrupts are enabled.
Sourcepub unsafe fn mswi_enable()
pub unsafe fn mswi_enable()
Sourcepub fn mswi_disable()
pub fn mswi_disable()
Disables the MSWI peripheral.
Sourcepub fn mtimer_is_interrupting() -> bool
pub fn mtimer_is_interrupting() -> bool
Returns true if a machine timer interrupt is pending.
Sourcepub fn mtimer_is_enabled() -> bool
pub fn mtimer_is_enabled() -> bool
Returns true if Machine Timer Interrupts are enabled.
Sourcepub unsafe fn mtimer_enable()
pub unsafe fn mtimer_enable()
Sets the Machine Timer Interrupt bit of the mie CSR.
This bit must be set for the MTIMER to trigger machine timer interrupts.
§Safety
Enabling the MTIMER may break mask-based critical sections.
Sourcepub fn mtimer_disable()
pub fn mtimer_disable()
Clears the Machine Timer Interrupt bit of the mie CSR.
When cleared, the MTIMER cannot trigger machine timer interrupts.