Struct pci_types::StatusRegister

source ·
pub struct StatusRegister(/* private fields */);

Implementations§

source§

impl StatusRegister

source

pub fn new(value: u16) -> Self

source

pub fn parity_error_detected(&self) -> bool

Will be true whenever the device detects a parity error, even if parity error handling is disabled.

source

pub fn signalled_system_error(&self) -> bool

Will be true whenever the device asserts SERR#.

source

pub fn received_master_abort(&self) -> bool

Will return true, by a master device, whenever its transaction (except for Special Cycle transactions) is terminated with Master-Abort.

source

pub fn received_target_abort(&self) -> bool

Will return true, by a master device, whenever its transaction is terminated with Target-Abort.

source

pub fn signalled_target_abort(&self) -> bool

Will return true whenever a target device terminates a transaction with Target-Abort.

source

pub fn devsel_timing(&self) -> Result<DevselTiming, ()>

The slowest time that a device will assert DEVSEL# for any bus command except Configuration Space read and writes.

For PCIe always set to Fast

source

pub fn master_data_parity_error(&self) -> bool

This returns true only when the following conditions are met:

  • The bus agent asserted PERR# on a read or observed an assertion of PERR# on a write
  • the agent setting the bit acted as the bus master for the operation in which the error occurred
  • bit 6 of the Command register (Parity Error Response bit) is set to 1.
source

pub fn fast_back_to_back_capable(&self) -> bool

If returns true the device can accept fast back-to-back transactions that are not from the same agent; otherwise, transactions can only be accepted from the same agent.

For PCIe always set to false

source

pub fn capable_66mhz(&self) -> bool

If returns true the device is capable of running at 66 MHz; otherwise, the device runs at 33 MHz.

For PCIe always set to false

source

pub fn has_capability_list(&self) -> bool

If returns true the device implements the pointer for a New Capabilities Linked list; otherwise, the linked list is not available.

For PCIe always set to true

source

pub fn interrupt_status(&self) -> bool

Represents the state of the device’s INTx# signal. If returns true and bit 10 of the Command register (Interrupt Disable bit) is set to 0 the signal will be asserted; otherwise, the signal will be ignored.

Trait Implementations§

source§

impl Clone for StatusRegister

source§

fn clone(&self) -> StatusRegister

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 StatusRegister

source§

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

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

impl PartialEq for StatusRegister

source§

fn eq(&self, other: &StatusRegister) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for StatusRegister

source§

impl Eq for StatusRegister

source§

impl StructuralPartialEq for StatusRegister

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.