[−][src]Struct r3::kernel::InterruptLine
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]
self,
value: InterruptPriority
) -> Result<(), SetInterruptLinePriorityError>
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]
self,
value: InterruptPriority
) -> Result<(), SetInterruptLinePriorityError>
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]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<System> PartialEq<InterruptLine<System>> for InterruptLine<System>
[src]
Auto Trait Implementations
impl<System> Send for InterruptLine<System> where
System: Send,
System: Send,
impl<System> Sync for InterruptLine<System> where
System: Sync,
System: Sync,
impl<System> Unpin for InterruptLine<System> where
System: Unpin,
System: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,