Trait r3_port_riscv::InterruptController [−][src]
pub trait InterruptController {
const MANAGED_INTERRUPT_PRIORITY_RANGE: Range<InterruptPriority>;
unsafe fn init() { ... }
unsafe fn set_interrupt_line_priority(
_line: InterruptNum,
_priority: InterruptPriority
) -> Result<(), SetInterruptLinePriorityError> { ... }
unsafe fn enable_interrupt_line(
_line: InterruptNum
) -> Result<(), EnableInterruptLineError> { ... }
unsafe fn disable_interrupt_line(
_line: InterruptNum
) -> Result<(), EnableInterruptLineError> { ... }
unsafe fn pend_interrupt_line(
_line: InterruptNum
) -> Result<(), PendInterruptLineError> { ... }
unsafe fn clear_interrupt_line(
_line: InterruptNum
) -> Result<(), ClearInterruptLineError> { ... }
unsafe fn is_interrupt_line_pending(
_line: InterruptNum
) -> Result<bool, QueryInterruptLineError> { ... }
}
Expand description
Associated Constants
The range of interrupt priority values considered managed.
Defaults to 0..0
(empty) when unspecified.
Provided methods
Initialize the driver. This will be called just before entering
PortToKernel::boot
.
Safety
See this trait’s documentation.
unsafe fn set_interrupt_line_priority(
_line: InterruptNum,
_priority: InterruptPriority
) -> Result<(), SetInterruptLinePriorityError>
unsafe fn set_interrupt_line_priority(
_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
.
Safety
See this trait’s documentation.
unsafe fn enable_interrupt_line(
_line: InterruptNum
) -> Result<(), EnableInterruptLineError>
unsafe fn enable_interrupt_line(
_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
.
Safety
See this trait’s documentation.
unsafe fn disable_interrupt_line(
_line: InterruptNum
) -> Result<(), EnableInterruptLineError>
unsafe fn disable_interrupt_line(
_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
.
Safety
See this trait’s documentation.
unsafe fn pend_interrupt_line(
_line: InterruptNum
) -> Result<(), PendInterruptLineError>
unsafe fn pend_interrupt_line(
_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
.
Safety
See this trait’s documentation.
unsafe fn clear_interrupt_line(
_line: InterruptNum
) -> Result<(), ClearInterruptLineError>
unsafe fn clear_interrupt_line(
_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
.
Safety
See this trait’s documentation.
unsafe fn is_interrupt_line_pending(
_line: InterruptNum
) -> Result<bool, QueryInterruptLineError>
unsafe fn is_interrupt_line_pending(
_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
.
Safety
See this trait’s documentation.