Trait r3_port_riscv::InterruptController
source · pub trait InterruptController {
const MANAGED_INTERRUPT_PRIORITY_RANGE: Range<InterruptPriority> = _;
// Provided methods
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
Provided Associated Constants§
sourceconst MANAGED_INTERRUPT_PRIORITY_RANGE: Range<InterruptPriority> = _
const MANAGED_INTERRUPT_PRIORITY_RANGE: Range<InterruptPriority> = _
The range of interrupt priority values considered managed.
Defaults to 0..0
(empty) when unspecified.
Provided Methods§
sourceunsafe fn init()
unsafe fn init()
Initialize the driver. This will be called just before entering
PortToKernel::boot
.
Safety
See this trait’s documentation.
sourceunsafe 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.
sourceunsafe 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.
sourceunsafe 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.
sourceunsafe 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.
sourceunsafe 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.
sourceunsafe 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.