[][src]Trait r3::kernel::PortInterrupts

pub unsafe trait PortInterrupts: KernelCfg1 {
    pub const MANAGED_INTERRUPT_PRIORITY_RANGE: Range<InterruptPriority>;
    pub const MANAGED_INTERRUPT_LINES: &'static [InterruptNum];
    pub unsafe fn set_interrupt_line_priority(
        _line: InterruptNum,
        _priority: InterruptPriority
    ) -> Result<(), SetInterruptLinePriorityError> { ... }
pub unsafe fn enable_interrupt_line(
        _line: InterruptNum
    ) -> Result<(), EnableInterruptLineError> { ... }
pub unsafe fn disable_interrupt_line(
        _line: InterruptNum
    ) -> Result<(), EnableInterruptLineError> { ... }
pub unsafe fn pend_interrupt_line(
        _line: InterruptNum
    ) -> Result<(), PendInterruptLineError> { ... }
pub unsafe fn clear_interrupt_line(
        _line: InterruptNum
    ) -> Result<(), ClearInterruptLineError> { ... }
pub unsafe fn is_interrupt_line_pending(
        _line: InterruptNum
    ) -> Result<bool, QueryInterruptLineError> { ... } }

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

pub const MANAGED_INTERRUPT_PRIORITY_RANGE: Range<InterruptPriority>[src]

The range of interrupt priority values considered managed.

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

pub const MANAGED_INTERRUPT_LINES: &'static [InterruptNum][src]

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.

Loading content...

Provided methods

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

Set the priority of the specified interrupt line.

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

pub unsafe fn enable_interrupt_line(
    _line: InterruptNum
) -> Result<(), EnableInterruptLineError>
[src]

Enable the specified interrupt line.

pub unsafe fn disable_interrupt_line(
    _line: InterruptNum
) -> Result<(), EnableInterruptLineError>
[src]

Disable the specified interrupt line.

pub unsafe fn pend_interrupt_line(
    _line: InterruptNum
) -> Result<(), PendInterruptLineError>
[src]

Set the pending flag of the specified interrupt line.

pub unsafe fn clear_interrupt_line(
    _line: InterruptNum
) -> Result<(), ClearInterruptLineError>
[src]

Clear the pending flag of the specified interrupt line.

pub unsafe fn is_interrupt_line_pending(
    _line: InterruptNum
) -> Result<bool, QueryInterruptLineError>
[src]

Read the pending flag of the specified interrupt line.

Loading content...

Implementors

Loading content...