pub struct Sirm {Show 13 fields
pub base: u64,
pub info: u32,
pub control: u32,
pub req_payload_size: u64,
pub req_leader_size: u32,
pub req_trailer_size: u32,
pub max_leader_size: u32,
pub max_trailer_size: u32,
pub payload_size: u64,
pub payload_count: u32,
pub transfer1_size: u32,
pub transfer2_size: u32,
pub max_payload_transfer: u32,
}Expand description
Streaming Interface Register Map — per-stream-channel configuration.
Fields§
§base: u64§info: u32§control: u32§req_payload_size: u64§req_leader_size: u32§req_trailer_size: u32§max_leader_size: u32§max_trailer_size: u32§payload_size: u64§payload_count: u32§transfer1_size: u32§transfer2_size: u32§max_payload_transfer: u32Implementations§
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 SIRM from the device at the given base address (from SBRM).
Source§impl Sirm
impl Sirm
Sourcepub fn enable<T: UsbTransfer>(
&self,
control: &mut ControlChannel<T>,
) -> Result<(), U3vError>
pub fn enable<T: UsbTransfer>( &self, control: &mut ControlChannel<T>, ) -> Result<(), U3vError>
Enable streaming by setting bit 0 of the SIRM control register.
Sourcepub fn disable<T: UsbTransfer>(
&self,
control: &mut ControlChannel<T>,
) -> Result<(), U3vError>
pub fn disable<T: UsbTransfer>( &self, control: &mut ControlChannel<T>, ) -> Result<(), U3vError>
Disable streaming by clearing bit 0 of the SIRM control register.
Sourcepub fn configure<T: UsbTransfer>(
&self,
control: &mut ControlChannel<T>,
payload_size: u64,
leader_size: u32,
trailer_size: u32,
) -> Result<(), U3vError>
pub fn configure<T: UsbTransfer>( &self, control: &mut ControlChannel<T>, payload_size: u64, leader_size: u32, trailer_size: u32, ) -> Result<(), U3vError>
Write the requested payload, leader, and trailer sizes to the SIRM.
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