[][src]Struct r3::kernel::InterruptLine

pub struct InterruptLine<System>(_, _);

Refers to an interrupt line in a system.

Implementations

impl<System: Port> InterruptLine<System>[src]

pub const fn build() -> CfgInterruptLineBuilder<System>[src]

Construct a CfgInterruptLineBuilder to configure an interrupt line in a configuration function.

It's allowed to call this for multiple times for the same interrupt line. However, each property (such as priority) cannot be specified more than once.

impl<System> InterruptLine<System>[src]

pub const fn from_num(num: InterruptNum) -> Self[src]

Construct a InterruptLine from InterruptNum.

pub const fn num(self) -> InterruptNum[src]

Get the raw InterruptNum value representing this interrupt line.

impl<System: Kernel> InterruptLine<System>[src]

pub fn set_priority(
    self,
    value: InterruptPriority
) -> Result<(), SetInterruptLinePriorityError>
[src]

Set the priority of the interrupt line. The new priority must fall within a managed range.

Turning a managed interrupt handler into an unmanaged one is unsafe because the behavior of system calls is undefined inside an unmanaged interrupt handler. This method checks the new priority to prevent this from happening and returns SetInterruptLinePriorityError::BadParam if the operation is unsafe.

pub unsafe fn set_priority_unchecked(
    self,
    value: InterruptPriority
) -> Result<(), SetInterruptLinePriorityError>
[src]

Set the priority of the interrupt line without checking if the new priority falls within a managed range.

Safety

If a non-unmanaged-safe interrupt handler is attached to the interrupt line, changing the priority of the interrupt line to outside of the managed range (thus turning the handler into an unmanaged handler) may allow the interrupt handler to invoke an undefined behavior, for example, by making system calls, which are disallowed in an unmanaged interrupt handler.

pub fn enable(self) -> Result<(), EnableInterruptLineError>[src]

Enable the interrupt line.

pub fn disable(self) -> Result<(), EnableInterruptLineError>[src]

Disable the interrupt line.

pub fn pend(self) -> Result<(), PendInterruptLineError>[src]

Set the pending flag of the interrupt line.

pub fn clear(self) -> Result<(), ClearInterruptLineError>[src]

Clear the pending flag of the interrupt line.

pub fn is_pending(self) -> Result<bool, QueryInterruptLineError>[src]

Read the pending flag of the interrupt line.

Trait Implementations

impl<System> Clone for InterruptLine<System>[src]

impl<System> Copy for InterruptLine<System>[src]

impl<System> Debug for InterruptLine<System>[src]

impl<System> Eq for InterruptLine<System>[src]

impl<System> Hash for InterruptLine<System>[src]

impl<System> PartialEq<InterruptLine<System>> for InterruptLine<System>[src]

Auto Trait Implementations

impl<System> Send for InterruptLine<System> where
    System: Send
[src]

impl<System> Sync for InterruptLine<System> where
    System: Sync
[src]

impl<System> Unpin for InterruptLine<System> where
    System: Unpin
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.