[−][src]Trait r3_port_riscv::InterruptController
An abstract interface to an interrupt controller. Implemented by
use_plic!
.
Safety
These methods are only intended to be called by the port.
Associated Constants
pub const MANAGED_INTERRUPT_PRIORITY_RANGE: Range<InterruptPriority>
[src]
The range of interrupt priority values considered managed.
Defaults to 0..0
(empty) when unspecified.
Provided methods
pub unsafe fn init()
[src]
Initialize the driver. This will be called just before entering
PortToKernel::boot
.
pub unsafe fn set_interrupt_line_priority(
_line: InterruptNum,
_priority: InterruptPriority
) -> Result<(), SetInterruptLinePriorityError>
[src]
_line: InterruptNum,
_priority: InterruptPriority
) -> Result<(), SetInterruptLinePriorityError>
Handle the call to PortInterrupts::set_interrupt_line_priority
for a
platform interrupt line.
The provided interrupt number must be greater than or equal to
INTERRUPT_PLATFORM_START
.
pub unsafe fn enable_interrupt_line(
_line: InterruptNum
) -> Result<(), EnableInterruptLineError>
[src]
_line: InterruptNum
) -> Result<(), EnableInterruptLineError>
Handle the call to PortInterrupts::enable_interrupt_line
for a
platform interrupt line.
The provided interrupt number must be greater than or equal to
INTERRUPT_PLATFORM_START
.
pub unsafe fn disable_interrupt_line(
_line: InterruptNum
) -> Result<(), EnableInterruptLineError>
[src]
_line: InterruptNum
) -> Result<(), EnableInterruptLineError>
Handle the call to PortInterrupts::disable_interrupt_line
for a
platform interrupt line.
The provided interrupt number must be greater than or equal to
INTERRUPT_PLATFORM_START
.
pub unsafe fn pend_interrupt_line(
_line: InterruptNum
) -> Result<(), PendInterruptLineError>
[src]
_line: InterruptNum
) -> Result<(), PendInterruptLineError>
Handle the call to PortInterrupts::pend_interrupt_line
for a
platform interrupt line.
The provided interrupt number must be greater than or equal to
INTERRUPT_PLATFORM_START
.
pub unsafe fn clear_interrupt_line(
_line: InterruptNum
) -> Result<(), ClearInterruptLineError>
[src]
_line: InterruptNum
) -> Result<(), ClearInterruptLineError>
Handle the call to PortInterrupts::clear_interrupt_line
for a
platform interrupt line.
The provided interrupt number must be greater than or equal to
INTERRUPT_PLATFORM_START
.
pub unsafe fn is_interrupt_line_pending(
_line: InterruptNum
) -> Result<bool, QueryInterruptLineError>
[src]
_line: InterruptNum
) -> Result<bool, QueryInterruptLineError>
Handle the call to PortInterrupts::is_interrupt_line_pending
for a
platform interrupt line.
The provided interrupt number must be greater than or equal to
INTERRUPT_PLATFORM_START
.