Struct pci_types::capability::MsiCapability

source ·
pub struct MsiCapability { /* private fields */ }

Implementations§

source§

impl MsiCapability

source

pub fn has_per_vector_masking(&self) -> bool

Does device supports masking individual vectors?

source

pub fn is_64bit(&self) -> bool

Is device using 64-bit addressing?

source

pub fn get_multiple_message_capable(&self) -> MultipleMessageSupport

How many interrupts this device has?

source

pub fn ctrl(&self, access: &impl ConfigRegionAccess) -> u32

source

pub fn is_enabled(&self, access: &impl ConfigRegionAccess) -> bool

Is MSI capability enabled?

source

pub fn set_enabled(&self, enabled: bool, access: &impl ConfigRegionAccess)

Enable or disable MSI capability

source

pub fn set_multiple_message_enable( &self, data: MultipleMessageSupport, access: &impl ConfigRegionAccess )

Set how many interrupts the device will use. If requested count is bigger than supported count, the second will be used.

source

pub fn get_multiple_message_enable( &self, access: &impl ConfigRegionAccess ) -> MultipleMessageSupport

Return how many interrupts the device is using

source

pub fn set_message_info( &self, address: u32, vector: u8, trigger_mode: TriggerMode, access: &impl ConfigRegionAccess )

Set where the interrupts will be sent to

§Arguments
  • address - Target Local APIC address (if not changed, can be calculated with 0xFEE00000 | (processor << 12))
  • vector - Which interrupt vector should be triggered on LAPIC
  • trigger_mode - When interrupt should be triggered
  • access - PCI Configuration Space accessor
source

pub fn get_message_mask(&self, access: &impl ConfigRegionAccess) -> u32

Get interrupt mask

§Note

Only supported on when device supports 64-bit addressing and per-vector masking. Otherwise returns 0

source

pub fn set_message_mask(&self, access: &impl ConfigRegionAccess, mask: u32)

Set interrupt mask

§Note

Only supported on when device supports 64-bit addressing and per-vector masking. Otherwise will do nothing

source

pub fn get_pending(&self, access: &impl ConfigRegionAccess) -> u32

Get pending interrupts

§Note

Only supported on when device supports 64-bit addressing. Otherwise will return 0

Trait Implementations§

source§

impl Clone for MsiCapability

source§

fn clone(&self) -> MsiCapability

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for MsiCapability

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

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, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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

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

Performs the conversion.
source§

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.
source§

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

Performs the conversion.