pub struct TransferRing { /* private fields */ }Expand description
Transfer Ring: per-endpoint ring for bulk/interrupt/control data transfers
Implementations§
Source§impl TransferRing
impl TransferRing
Sourcepub unsafe fn enqueue(&mut self, trb: Trb) -> u64
pub unsafe fn enqueue(&mut self, trb: Trb) -> u64
Enqueue a TRB onto the transfer ring.
§Safety
The caller must ensure the ring segment is valid DMA memory.
Sourcepub unsafe fn enqueue_control(
&mut self,
request_type: u8,
request: u8,
value: u16,
index: u16,
data_phys: u64,
data_len: u16,
) -> u64
pub unsafe fn enqueue_control( &mut self, request_type: u8, request: u8, value: u16, index: u16, data_phys: u64, data_len: u16, ) -> u64
Enqueue a control transfer (Setup + optional Data + Status).
Returns the physical address of the Status Stage TRB.
§Safety
The caller must ensure the ring segment is valid DMA memory and
data_phys (if non-zero) points to a valid buffer of data_len bytes.