Struct rstubs::arch::int::lapic::InterruptCmdL

source ·
#[repr(transparent)]
struct InterruptCmdL(u32);
Expand description

Interrupt Command Register 1, R/W

Tuple Fields§

§0: u32

Implementations§

source§

impl InterruptCmdL

source

const fn new() -> Self

Creates a new default initialized bitfield.

source

const fn from_bits(bits: u32) -> Self

Convert from bits.

source

const fn into_bits(self) -> u32

Convert into bits.

source

const VECTOR_BITS: usize = 8usize

source

const VECTOR_OFFSET: usize = 0usize

source

pub const fn vector(&self) -> u8

Interrupt vector in the IDT will be activated when the corresponding external interrupt triggers.

Bits: 0..8

source

pub const fn with_vector(self, value: u8) -> Self

Interrupt vector in the IDT will be activated when the corresponding external interrupt triggers.

Bits: 0..8

source

pub fn set_vector(&mut self, value: u8)

Interrupt vector in the IDT will be activated when the corresponding external interrupt triggers.

Bits: 0..8

source

const DELIVERY_MODE_BITS: usize = 3usize

source

const DELIVERY_MODE_OFFSET: usize = 8usize

source

pub const fn delivery_mode(&self) -> DeliveryMode

The delivery mode denotes the way the interrupts will be delivered to the local CPU cores, respectively to their local APICs.

Bits: 8..11

source

pub const fn with_delivery_mode(self, value: DeliveryMode) -> Self

The delivery mode denotes the way the interrupts will be delivered to the local CPU cores, respectively to their local APICs.

Bits: 8..11

source

pub fn set_delivery_mode(&mut self, value: DeliveryMode)

The delivery mode denotes the way the interrupts will be delivered to the local CPU cores, respectively to their local APICs.

Bits: 8..11

source

const DESTINATION_MODE_BITS: usize = 1usize

source

const DESTINATION_MODE_OFFSET: usize = 11usize

source

pub const fn destination_mode(&self) -> bool

The destination mode.

Clear for a physical destination, or set for a logical destination.

Bits: 11..12

source

pub const fn with_destination_mode(self, value: bool) -> Self

The destination mode.

Clear for a physical destination, or set for a logical destination.

Bits: 11..12

source

pub fn set_destination_mode(&mut self, value: bool)

The destination mode.

Clear for a physical destination, or set for a logical destination.

Bits: 11..12

source

const DELIVERY_STATUS_BITS: usize = 1usize

source

const DELIVERY_STATUS_OFFSET: usize = 12usize

source

pub const fn delivery_status(&self) -> bool

Delivery status.

Cleared when the interrupt has been accepted by the target. You should usually wait until this bit clears after sending an interrupt.

Bits: 12..13

source

pub const fn with_delivery_status(self, value: bool) -> Self

Delivery status.

Cleared when the interrupt has been accepted by the target. You should usually wait until this bit clears after sending an interrupt.

Bits: 12..13

source

pub fn set_delivery_status(&mut self, value: bool)

Delivery status.

Cleared when the interrupt has been accepted by the target. You should usually wait until this bit clears after sending an interrupt.

Bits: 12..13

source

const LEVEL_BITS: usize = 1usize

source

const LEVEL_OFFSET: usize = 14usize

source

pub const fn level(&self) -> bool

The polarity denotes when an interrupt should be issued.

Clear for INIT level de-assert, otherwise set.

Bits: 14..15

source

pub const fn with_level(self, value: bool) -> Self

The polarity denotes when an interrupt should be issued.

Clear for INIT level de-assert, otherwise set.

Bits: 14..15

source

pub fn set_level(&mut self, value: bool)

The polarity denotes when an interrupt should be issued.

Clear for INIT level de-assert, otherwise set.

Bits: 14..15

source

const TRIGGER_MODE_BITS: usize = 1usize

source

const TRIGGER_MODE_OFFSET: usize = 15usize

source

pub const fn trigger_mode(&self) -> bool

The trigger mode states whether the interrupt signaling is level or edge triggered.

Set for INIT level de-assert, otherwise clear.

Bits: 15..16

source

pub const fn with_trigger_mode(self, value: bool) -> Self

The trigger mode states whether the interrupt signaling is level or edge triggered.

Set for INIT level de-assert, otherwise clear.

Bits: 15..16

source

pub fn set_trigger_mode(&mut self, value: bool)

The trigger mode states whether the interrupt signaling is level or edge triggered.

Set for INIT level de-assert, otherwise clear.

Bits: 15..16

source

const DESTINATION_TYPE_BITS: usize = 2usize

source

const DESTINATION_TYPE_OFFSET: usize = 18usize

source

pub const fn destination_type(&self) -> u8

Destination type.

If this is > 0 then the destination field is ignored. 1 will always send the interrupt to itself, 2 will send it to all processors, and 3 will send it to all processors aside from the current one.

It is best to avoid using modes 1, 2 and 3, and stick with 0.

Bits: 18..20

source

pub const fn with_destination_type(self, value: u8) -> Self

Destination type.

If this is > 0 then the destination field is ignored. 1 will always send the interrupt to itself, 2 will send it to all processors, and 3 will send it to all processors aside from the current one.

It is best to avoid using modes 1, 2 and 3, and stick with 0.

Bits: 18..20

source

pub fn set_destination_type(&mut self, value: u8)

Destination type.

If this is > 0 then the destination field is ignored. 1 will always send the interrupt to itself, 2 will send it to all processors, and 3 will send it to all processors aside from the current one.

It is best to avoid using modes 1, 2 and 3, and stick with 0.

Bits: 18..20

Trait Implementations§

source§

impl Clone for InterruptCmdL

source§

fn clone(&self) -> InterruptCmdL

Returns a copy of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for InterruptCmdL

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for InterruptCmdL

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl From<InterruptCmdL> for u32

source§

fn from(v: InterruptCmdL) -> u32

Converts to this type from the input type.
source§

impl From<u32> for InterruptCmdL

source§

fn from(v: u32) -> Self

Converts to this type from the input type.
source§

impl IOMem for InterruptCmdL

source§

const OFFSET: usize = 768usize

source§

impl Copy for InterruptCmdL

Auto Trait Implementations§

§

impl Freeze for InterruptCmdL

§

impl RefUnwindSafe for InterruptCmdL

§

impl Send for InterruptCmdL

§

impl Sync for InterruptCmdL

§

impl Unpin for InterruptCmdL

§

impl UnwindSafe for InterruptCmdL

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Az for T

source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

source§

impl<T> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.