pub unsafe trait PortInterrupts: KernelCfg1 {
    const MANAGED_INTERRUPT_PRIORITY_RANGE: Range<InterruptPriority> = _;
    const MANAGED_INTERRUPT_LINES: &'static [InterruptNum] = _;

    // Provided methods
    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.

Provided Associated Constants§

source

const MANAGED_INTERRUPT_PRIORITY_RANGE: Range<InterruptPriority> = _

The range of interrupt priority values considered managed.

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

source

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§

source

unsafe fn set_interrupt_line_priority( _line: InterruptNum, _priority: InterruptPriority ) -> Result<(), SetInterruptLinePriorityError>

Set the priority of the specified interrupt line.

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

source

unsafe fn enable_interrupt_line( _line: InterruptNum ) -> Result<(), EnableInterruptLineError>

Enable the specified interrupt line.

source

unsafe fn disable_interrupt_line( _line: InterruptNum ) -> Result<(), EnableInterruptLineError>

Disable the specified interrupt line.

source

unsafe fn pend_interrupt_line( _line: InterruptNum ) -> Result<(), PendInterruptLineError>

Set the pending flag of the specified interrupt line.

source

unsafe fn clear_interrupt_line( _line: InterruptNum ) -> Result<(), ClearInterruptLineError>

Clear the pending flag of the specified interrupt line.

source

unsafe fn is_interrupt_line_pending( _line: InterruptNum ) -> Result<bool, QueryInterruptLineError>

Read the pending flag of the specified interrupt line.

Implementors§