pub struct Sirm {
pub base: u64,
pub info: u32,
pub control: u32,
pub required_payload_size: u64,
pub required_leader_size: u32,
pub required_trailer_size: u32,
}Expand description
What the device says about one stream channel.
Fields§
§base: u64Where the SIRM is.
info: u32SI Info: the transfer alignment, as a power of two in bits 24-31.
control: u32SI Control: bit 0 enables streaming.
required_payload_size: u64Required Payload Size: bytes a block’s payload takes.
required_leader_size: u32Required Leader Size.
required_trailer_size: u32Required Trailer Size.
Implementations§
Source§impl Sirm
impl Sirm
Sourcepub fn read_from<T: UsbTransfer>(
control: &mut ControlChannel<T>,
base: u64,
) -> Result<Self, U3vError>
pub fn read_from<T: UsbTransfer>( control: &mut ControlChannel<T>, base: u64, ) -> Result<Self, U3vError>
Read the device’s half of the SIRM at the given base address (from SBRM).
Sourcepub fn alignment(&self) -> Result<u32, U3vError>
pub fn alignment(&self) -> Result<u32, U3vError>
The alignment every transfer size must keep, from Info bits 24-31.
Sourcepub fn configure<T: UsbTransfer>(
&self,
control: &mut ControlChannel<T>,
layout: &StreamLayout,
) -> Result<(), U3vError>
pub fn configure<T: UsbTransfer>( &self, control: &mut ControlChannel<T>, layout: &StreamLayout, ) -> Result<(), U3vError>
Write the transfer layout the host will read with. The required sizes are the device’s and are never written: they are read-only, and a device refuses the write (Codex review of #181).
Sourcepub fn enable<T: UsbTransfer>(
&self,
control: &mut ControlChannel<T>,
) -> Result<(), U3vError>
pub fn enable<T: UsbTransfer>( &self, control: &mut ControlChannel<T>, ) -> Result<(), U3vError>
Set StreamEnable.
Sourcepub fn disable<T: UsbTransfer>(
&self,
control: &mut ControlChannel<T>,
) -> Result<(), U3vError>
pub fn disable<T: UsbTransfer>( &self, control: &mut ControlChannel<T>, ) -> Result<(), U3vError>
Clear StreamEnable.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sirm
impl RefUnwindSafe for Sirm
impl Send for Sirm
impl Sync for Sirm
impl Unpin for Sirm
impl UnsafeUnpin for Sirm
impl UnwindSafe for Sirm
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