pub struct Status(/* private fields */);
Expand description
A PCI device’s Status
register.
Implementations§
Source§impl Status
impl Status
Sourcepub const INTERRUPT_STATUS: Pack16<bool, Self>
pub const INTERRUPT_STATUS: Pack16<bool, Self>
Interrupt Status.
Represents the state of the device’s INTx#
signal. If set to 1 and
bit 10 of the Command
register ([INTERRUPT_DISABLE
]) is set to
0, the signal will be asserted; otherwise, the signal will be ignored.
Sourcepub const CAPABILITIES_LIST: Pack16<bool, Self>
pub const CAPABILITIES_LIST: Pack16<bool, Self>
Capabilities List
If set to 1, the device implements the pointer for a New Capabilities
linked list at offset 0x34
; otherwise, the linked list is not available.
Sourcepub const IS_66MHZ_CAPABLE: Pack16<bool, Self>
pub const IS_66MHZ_CAPABLE: Pack16<bool, Self>
66 MHz Capable
If set to 1 the device is capable of running at 66 MHz; otherwise, the device runs at 33 MHz.
Sourcepub const FAST_BACK_TO_BACK_CAPABLE: Pack16<bool, Self>
pub const FAST_BACK_TO_BACK_CAPABLE: Pack16<bool, Self>
Fast Back-To-Back Capable
If set to 1 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.
Sourcepub const MASTER_DATA_PARITY_ERROR: Pack16<bool, Self>
pub const MASTER_DATA_PARITY_ERROR: Pack16<bool, Self>
Master Data Parity Error
This bit is only set 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, and bit 6 of the
Command
register (PARITY_ERROR_RESPONSE
bit) is set to 1.
Sourcepub const DEVSEL_TIMING: Pack16<DevselTiming, Self>
pub const DEVSEL_TIMING: Pack16<DevselTiming, Self>
DEVSEL#
Timing
Read-only bits that represent the slowest time that a device will
assert DEVSEL#
for any bus command except Configuration Space read
and writes. A value of 0x0 represents fast timing, a value of
0x1 represents medium timing, and a value of 0x2 represents slow
timing.
Sourcepub const SIGNALLED_TARGET_ABORT: Pack16<bool, Self>
pub const SIGNALLED_TARGET_ABORT: Pack16<bool, Self>
Signalled Target Abort
This bit will be set to 1 whenever a target device terminates a transaction with Target-Abort.
Sourcepub const RECEIVED_TARGET_ABORT: Pack16<bool, Self>
pub const RECEIVED_TARGET_ABORT: Pack16<bool, Self>
Received Target Abort
This bit will be set to 1, by a master device, whenever its transaction is terminated with Target-Abort.
Sourcepub const RECEIVED_MASTER_ABORT: Pack16<bool, Self>
pub const RECEIVED_MASTER_ABORT: Pack16<bool, Self>
Received Master Abort
This bit will be set to 1, by a master device, whenever its transaction (except for Special Cycle transactions) is terminated with Master-Abort.
Sourcepub const SIGNALLED_SYSTEM_ERROR: Pack16<bool, Self>
pub const SIGNALLED_SYSTEM_ERROR: Pack16<bool, Self>
Signalled System Error
This bit will be set to 1 whenever the device asserts SERR#
.
Sourcepub const DETECTED_PARITY_ERROR: Pack16<bool, Self>
pub const DETECTED_PARITY_ERROR: Pack16<bool, Self>
Detected Parity Error
This bit will be set to 1 whenever the device detects a parity error, even if parity error handling is disabled.
Sourcepub const fn from_bits(bits: u16) -> Self
pub const fn from_bits(bits: u16) -> Self
Constructs a new instance of Self
from the provided raw bits.
Sourcepub fn with<T>(self, field: Pack16<T, Self>, value: T) -> Self
pub fn with<T>(self, field: Pack16<T, Self>, value: T) -> Self
Packs the bit representation of value
into self
at the bit
range designated by field
, returning a new bitfield.
Sourcepub fn set<T>(&mut self, field: Pack16<T, Self>, value: T) -> &mut Self
pub fn set<T>(&mut self, field: Pack16<T, Self>, value: T) -> &mut Self
Packs the bit representation of value
into self
at the range
designated by field
, mutating self
in place.
Sourcepub fn get<T>(self, field: Pack16<T, Self>) -> T
pub fn get<T>(self, field: Pack16<T, Self>) -> T
Unpacks the bit range represented by field
from self
, and
converts it into a T
-typed value.
§Panics
This method panics if self
does not contain a valid bit
pattern for a T
-typed value, as determined by T
’s
FromBits::try_from_bits
implementation.
Sourcepub fn try_get<T>(self, field: Pack16<T, Self>) -> Result<T, T::Error>
pub fn try_get<T>(self, field: Pack16<T, Self>) -> Result<T, T::Error>
Unpacks the bit range represented by field
from self
and attempts to convert it into a T
-typed value.
§Returns
Ok(T)
if aT
-typed value could be constructed from the bits insrc
Err(T::Error)
ifsrc
does not contain a valid bit pattern for aT
-typed value, as determined byT
’s [FromBits::try_from_bits
implementation.
Sourcepub fn assert_valid()
pub fn assert_valid()
Asserts that all the packing specs for this type are valid.
This is intended to be used in unit tests.
Sourcepub fn display_ascii(&self) -> impl Display
pub fn display_ascii(&self) -> impl Display
Returns a value that formats this bitfield in a multi-line format, using only ASCII characters.
This is equivalent to formatting this bitfield using a {}
display specifier, but will never use Unicode box-drawing
characters, even when an upstream formatter uses the {:#}
fmt::Display
specifier. This is intended for use on platforms
where Unicode box drawing characters are never available.
Sourcepub fn display_unicode(&self) -> impl Display
pub fn display_unicode(&self) -> impl Display
Returns a value that formats this bitfield in a multi-line format, always using Unicode box-drawing characters.
This is equivalent to formatting this bitfield using a {:#}
format specifier, but will always use Unicode box-drawing
characters, even when an upstream formatter uses the {}
fmt::Display
specifier.
Source§impl Status
impl Status
Sourcepub fn received_abort(self) -> bool
pub fn received_abort(self) -> bool
Returns true
if this device received an abort (either a Master Abort
or Target Abort).
This returns true
if the Status::RECEIVED_MASTER_ABORT
or
Status::RECEIVED_TARGET_ABORT
bits are set.
Trait Implementations§
Source§impl FromBits<u32> for Status
impl FromBits<u32> for Status
Source§type Error = Infallible
type Error = Infallible
Self::try_from_bits
when an invalid bit
pattern is encountered. Read more