#[repr(transparent)]pub struct CommonHeader(pub u16);Expand description
Common configuration space header registers shared between Type 0 and Type 1 headers.
These registers appear at the same offsets in both header types and have the same meaning and format.
| Offset | Bits 31-24 | Bits 23-16 | Bits 15-8 | Bits 7-0 |
|---|---|---|---|---|
| 0x0 | Device ID | Vendor ID | ||
| 0x4 | Status | Command | ||
| 0x8 | Class code | Revision ID | ||
| 0x34 | Reserved | Capabilities Pointer |
Tuple Fields§
§0: u16Implementations§
Source§impl CommonHeader
impl CommonHeader
pub const DEVICE_VENDOR: CommonHeader
pub const STATUS_COMMAND: CommonHeader
pub const CLASS_REVISION: CommonHeader
pub const RESERVED_CAP_PTR: CommonHeader
Trait Implementations§
Source§impl Clone for CommonHeader
impl Clone for CommonHeader
Source§fn clone(&self) -> CommonHeader
fn clone(&self) -> CommonHeader
Returns a duplicate 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 moreSource§impl Debug for CommonHeader
impl Debug for CommonHeader
Source§impl Hash for CommonHeader
impl Hash for CommonHeader
Source§impl Ord for CommonHeader
impl Ord for CommonHeader
Source§fn cmp(&self, other: &CommonHeader) -> Ordering
fn cmp(&self, other: &CommonHeader) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CommonHeader
impl PartialEq for CommonHeader
Source§impl PartialOrd for CommonHeader
impl PartialOrd for CommonHeader
impl Copy for CommonHeader
impl Eq for CommonHeader
impl StructuralPartialEq for CommonHeader
Auto Trait Implementations§
impl Freeze for CommonHeader
impl RefUnwindSafe for CommonHeader
impl Send for CommonHeader
impl Sync for CommonHeader
impl Unpin for CommonHeader
impl UnwindSafe for CommonHeader
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