#[repr(C)]pub struct CommandHeader {
pub flags_and_prdtl: u32,
pub prdbc: u32,
pub ctba_lo: u32,
pub ctba_hi: u32,
pub _reserved: [u32; 4],
}Expand description
Command Header (32 bytes, one per command slot).
The command list is an array of up to 32 command headers.
Fields§
§flags_and_prdtl: u32DW0: Command FIS Length (bits 4:0, in DWORDs), ATAPI (bit 5), Write direction (bit 6), Prefetchable (bit 7), Reset (bit 8), BIST (bit 9), Clear Busy upon R_OK (bit 10), Reserved (bit 11), Port Multiplier Port (bits 15:12), PRDT Length (bits 31:16).
prdbc: u32DW1: Physical Region Descriptor Byte Count (transferred so far).
ctba_lo: u32DW2: Command Table Descriptor Base Address (lower 32 bits, 128-byte aligned).
ctba_hi: u32DW3: Command Table Descriptor Base Address (upper 32 bits).
_reserved: [u32; 4]DW4-7: Reserved.
Implementations§
Source§impl CommandHeader
impl CommandHeader
Sourcepub fn new(
fis_len_dwords: u8,
prdt_count: u16,
write: bool,
ctba_phys: u64,
) -> Self
pub fn new( fis_len_dwords: u8, prdt_count: u16, write: bool, ctba_phys: u64, ) -> Self
Create a new command header.
fis_len_dwords: Length of the command FIS in DWORDs (typically 5 for
H2D FIS). prdt_count: Number of PRDT entries.
write: True if this is a write (host-to-device data) command.
ctba_phys: Physical address of the command table (128-byte aligned).
Trait Implementations§
Source§impl Clone for CommandHeader
impl Clone for CommandHeader
Source§fn clone(&self) -> CommandHeader
fn clone(&self) -> CommandHeader
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CommandHeader
impl Debug for CommandHeader
impl Copy for CommandHeader
Auto Trait Implementations§
impl Freeze for CommandHeader
impl RefUnwindSafe for CommandHeader
impl Send for CommandHeader
impl Sync for CommandHeader
impl Unpin for CommandHeader
impl UnwindSafe for CommandHeader
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)