Struct pci_types::capability::MsiCapability
source · 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 get_multiple_message_capable(&self) -> MultipleMessageSupport
pub fn get_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 get_multiple_message_enable(
&self,
access: &impl ConfigRegionAccess
) -> MultipleMessageSupport
pub fn get_multiple_message_enable( &self, access: &impl ConfigRegionAccess ) -> MultipleMessageSupport
Return how many interrupts the device is using
sourcepub fn set_message_info(
&self,
address: u32,
vector: u8,
trigger_mode: TriggerMode,
access: &impl ConfigRegionAccess
)
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 with0xFEE00000 | (processor << 12)
)vector
- Which interrupt vector should be triggered on LAPICtrigger_mode
- When interrupt should be triggeredaccess
- PCI Configuration Space accessor
sourcepub fn get_message_mask(&self, access: &impl ConfigRegionAccess) -> u32
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
sourcepub fn set_message_mask(&self, access: &impl ConfigRegionAccess, mask: u32)
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
sourcepub fn get_pending(&self, access: &impl ConfigRegionAccess) -> u32
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
impl Clone for MsiCapability
source§fn clone(&self) -> MsiCapability
fn clone(&self) -> MsiCapability
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto 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
Mutably borrows from an owned value. Read more