pub struct MsiCapability { /* private fields */ }
Implementations§
Source§impl MsiCapability
impl MsiCapability
Sourcepub fn has_per_vector_masking(&self) -> bool
pub fn has_per_vector_masking(&self) -> bool
Does device supports masking individual vectors?
Sourcepub fn multiple_message_capable(&self) -> MultipleMessageSupport
pub fn multiple_message_capable(&self) -> MultipleMessageSupport
How many interrupts this device has?
pub fn ctrl(&self, access: impl ConfigRegionAccess) -> u32
Sourcepub fn is_enabled(&self, access: impl ConfigRegionAccess) -> bool
pub fn is_enabled(&self, access: impl ConfigRegionAccess) -> bool
Is MSI capability enabled?
Sourcepub fn set_enabled(&self, enabled: bool, access: impl ConfigRegionAccess)
pub fn set_enabled(&self, enabled: bool, access: impl ConfigRegionAccess)
Enable or disable MSI capability
Sourcepub fn set_multiple_message_enable(
&self,
data: MultipleMessageSupport,
access: impl ConfigRegionAccess,
)
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.
Sourcepub fn multiple_message_enable(
&self,
access: impl ConfigRegionAccess,
) -> MultipleMessageSupport
pub fn multiple_message_enable( &self, access: impl ConfigRegionAccess, ) -> MultipleMessageSupport
Return how many interrupts the device is using
Sourcepub fn set_message_info(
&self,
address: u64,
data: u32,
access: impl ConfigRegionAccess,
)
pub fn set_message_info( &self, address: u64, data: u32, access: impl ConfigRegionAccess, )
Set the memory address that will be written to when the interrupt fires, and the data that will be written to it.
Sourcepub fn set_message_info_lapic(
&self,
address: u64,
vector: u8,
trigger_mode: TriggerMode,
access: impl ConfigRegionAccess,
)
pub fn set_message_info_lapic( &self, address: u64, vector: u8, trigger_mode: TriggerMode, access: impl ConfigRegionAccess, )
Set the memory address that will be written to when the interrupt fires, and the data that will be written to it, specialised for the message format the LAPIC expects.
§Arguments
address
- Target Local APIC address (if not changed, can be calculated with0xfee00000 | (processor << 12)
)vector
- Which interrupt vector should be triggered on LAPICtrigger_mode
- When interrupt should be triggeredaccess
- PCI Configuration Space accessor
Sourcepub fn message_mask(&self, access: impl ConfigRegionAccess) -> u32
pub fn 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
Sourcepub fn set_message_mask(&self, mask: u32, access: impl ConfigRegionAccess)
pub fn set_message_mask(&self, mask: u32, access: impl ConfigRegionAccess)
Set interrupt mask
§Note
Only supported on when device supports 64-bit addressing and per-vector masking. Otherwise will do nothing
Sourcepub fn is_pending(&self, access: impl ConfigRegionAccess) -> u32
pub fn is_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
impl Clone for MsiCapability
Source§fn clone(&self) -> MsiCapability
fn clone(&self) -> MsiCapability
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MsiCapability
impl Debug for MsiCapability
impl Copy for MsiCapability
Auto Trait Implementations§
impl Freeze for MsiCapability
impl RefUnwindSafe for MsiCapability
impl Send for MsiCapability
impl Sync for MsiCapability
impl Unpin for MsiCapability
impl UnwindSafe for MsiCapability
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)