logo
pub unsafe trait PortInterrupts: KernelCfg1 {
    const MANAGED_INTERRUPT_PRIORITY_RANGE: Range<InterruptPriority>;
    const MANAGED_INTERRUPT_LINES: &'static [InterruptNum];
    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

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

The range of interrupt priority values considered managed.

Defaults to 0..0 (empty) when unspecified.

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

Set the priority of the specified interrupt line.

Precondition: CPU Lock active. Task context or boot phase.

Enable the specified interrupt line.

Disable the specified interrupt line.

Set the pending flag of the specified interrupt line.

Clear the pending flag of the specified interrupt line.

Read the pending flag of the specified interrupt line.

Implementors