[−][src]Trait r3::kernel::PortInterrupts
Implemented by a port. This trait contains items related to controlling interrupt lines.
Safety
Implementing a port is inherently unsafe because it's responsible for initializing the execution environment and providing a dispatcher implementation.
These methods are only meant to be called by the kernel.
Associated Constants
const MANAGED_INTERRUPT_PRIORITY_RANGE: Range<InterruptPriority>
The range of interrupt priority values considered managed.
Defaults to 0..0
(empty) when unspecified.
const MANAGED_INTERRUPT_LINES: &'static [InterruptNum]
The list of interrupt lines which are considered managed.
Defaults to &[]
(empty) when unspecified.
This is useful when the driver employs a fixed priority scheme and doesn't support changing interrupt line priorities.
Provided methods
unsafe fn set_interrupt_line_priority(
_line: InterruptNum,
_priority: InterruptPriority
) -> Result<(), SetInterruptLinePriorityError>
_line: InterruptNum,
_priority: InterruptPriority
) -> Result<(), SetInterruptLinePriorityError>
Set the priority of the specified interrupt line.
Precondition: CPU Lock active. Task context or boot phase.
unsafe fn enable_interrupt_line(
_line: InterruptNum
) -> Result<(), EnableInterruptLineError>
_line: InterruptNum
) -> Result<(), EnableInterruptLineError>
Enable the specified interrupt line.
unsafe fn disable_interrupt_line(
_line: InterruptNum
) -> Result<(), EnableInterruptLineError>
_line: InterruptNum
) -> Result<(), EnableInterruptLineError>
Disable the specified interrupt line.
unsafe fn pend_interrupt_line(
_line: InterruptNum
) -> Result<(), PendInterruptLineError>
_line: InterruptNum
) -> Result<(), PendInterruptLineError>
Set the pending flag of the specified interrupt line.
unsafe fn clear_interrupt_line(
_line: InterruptNum
) -> Result<(), ClearInterruptLineError>
_line: InterruptNum
) -> Result<(), ClearInterruptLineError>
Clear the pending flag of the specified interrupt line.
unsafe fn is_interrupt_line_pending(
_line: InterruptNum
) -> Result<bool, QueryInterruptLineError>
_line: InterruptNum
) -> Result<bool, QueryInterruptLineError>
Read the pending flag of the specified interrupt line.