pub struct PLIC;Expand description
PLIC peripheral
Implementations§
Source§impl PLIC
impl PLIC
Sourcepub fn is_interrupting() -> bool
pub fn is_interrupting() -> bool
Returns true if a machine external interrupt is pending.
Sourcepub fn is_enabled() -> bool
pub fn is_enabled() -> bool
Returns true if Machine External Interrupts are enabled.
Sourcepub unsafe fn enable()
pub unsafe fn enable()
Enables machine external interrupts to allow the PLIC to trigger interrupts.
§Safety
Enabling the PLIC may break mask-based critical sections.
Sourcepub fn disable()
pub fn disable()
Disables machine external interrupts to prevent the PLIC from triggering interrupts.
Sourcepub fn priorities() -> PRIORITIES
pub fn priorities() -> PRIORITIES
Returns the priorities register of the PLIC.
Sourcepub fn ctx<H>(hart_id: H) -> CTX<PLIC>where
H: HartIdNumber,
pub fn ctx<H>(hart_id: H) -> CTX<PLIC>where
H: HartIdNumber,
Returns the context proxy of a given PLIC HART context.
Sourcepub fn ctx_mhartid() -> CTX<PLIC>
pub fn ctx_mhartid() -> CTX<PLIC>
Returns the PLIC HART context for the current HART.
§Note
This function determines the current HART ID by reading the riscv::register::mhartid CSR.
Thus, it can only be used in M-mode. For S-mode, use PLIC::ctx instead.
Trait Implementations§
impl Copy for PLIC
impl Eq for PLIC
impl StructuralPartialEq for PLIC
Auto Trait Implementations§
impl Freeze for PLIC
impl RefUnwindSafe for PLIC
impl Send for PLIC
impl Sync for PLIC
impl Unpin for PLIC
impl UnwindSafe for PLIC
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