Struct cameleon::u3v::register_map::Sirm
source · pub struct Sirm { /* private fields */ }
Expand description
Represent Streaming Interface Register Map (SIRM).
To maintain consistency with the device data, Sirm
doesn’t cache any data. It means
that all methods of this struct cause communication with the device every time, thus the device
is expected to be opened when methods are called.
Implementations§
source§impl Sirm
impl Sirm
sourcepub fn new(sirm_addr: u64) -> Self
pub fn new(sirm_addr: u64) -> Self
Constructs new Sirm
, consider using super::ControlHandle::sirm
instead.
To construct Sirm
, Use Sbrm::sirm
also can be used.
sourcepub fn payload_size_alignment<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl
) -> ControlResult<usize>
pub fn payload_size_alignment<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<usize>
Returns required alignment size of payload.
A host must use this value as a minimum alignment size when modifying SIRM registers related to payload size.
sourcepub fn enable_stream<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl
) -> ControlResult<()>
pub fn enable_stream<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<()>
Enables stream.
It’s forbidden to write to SIRM registers while stream is enabled.
sourcepub fn disable_stream<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl
) -> ControlResult<()>
pub fn disable_stream<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<()>
Disables stream.
It’s forbidden to write to SIRM registers while stream is enabled.
sourcepub fn is_stream_enable<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl
) -> ControlResult<bool>
pub fn is_stream_enable<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<bool>
Returns true
if stream is enabled.
sourcepub fn required_payload_size<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl
) -> ControlResult<u64>
pub fn required_payload_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u64>
Payload size of an image or chunk data in current device configuration.
This value is never changed while stream is enabled. Once stream is disabled, the value may be changed, so The host must reload the value to update the buffer size required for payload data.
sourcepub fn required_leader_size<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl
) -> ControlResult<u32>
pub fn required_leader_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u32>
Leader size of an image or chunk data in current device configuration.
This value is never changed while stream is enabled. Once stream is disabled, the value may be changed, so The host must reload the value to update the buffer size required for payload data.
sourcepub fn required_trailer_size<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl
) -> ControlResult<u32>
pub fn required_trailer_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u32>
Trailer size of an image or chunk data in current device configuration.
This value is never changed while stream is enabled. Once stream is disabled, the value may be changed, so The host must reload the value to update the buffer size required for payload data.
sourcepub fn maximum_leader_size<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl
) -> ControlResult<u32>
pub fn maximum_leader_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u32>
Maximum leader size in any device configuration.
sourcepub fn set_maximum_leader_size<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl,
size: u32
) -> ControlResult<()>
pub fn set_maximum_leader_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl, size: u32 ) -> ControlResult<()>
Sets maximum leader size in any device configuration.
A leader must be fit within one bulk transfer, so maximum_leader_size
is restricted by the
maximum size that one bulk transfer can contain.
If the leader size is greater than this value in the current configuration, then device can’t
start streaming.
sourcepub fn maximum_trailer_size<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl
) -> ControlResult<u32>
pub fn maximum_trailer_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u32>
Maximum trailer size in any device configuration.
sourcepub fn set_maximum_trailer_size<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl,
size: u32
) -> ControlResult<()>
pub fn set_maximum_trailer_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl, size: u32 ) -> ControlResult<()>
Sets maximum trailer size in any device configuration.
A trailer must be fit within one bulk transfer, so maximum_trailer_size
is restricted by the
maximum size that one bulk transfer can contain.
If the trailer size is greater than this value in the current configuration, then device can’t
start streaming.
sourcepub fn payload_transfer_size<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl
) -> ControlResult<u32>
pub fn payload_transfer_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u32>
Payload transfer size.
sourcepub fn set_payload_transfer_size<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl,
size: u32
) -> ControlResult<()>
pub fn set_payload_transfer_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl, size: u32 ) -> ControlResult<()>
Set payload transfer size.
sourcepub fn payload_transfer_count<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl
) -> ControlResult<u32>
pub fn payload_transfer_count<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u32>
Payload transfer count.
sourcepub fn set_payload_transfer_count<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl,
size: u32
) -> ControlResult<()>
pub fn set_payload_transfer_count<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl, size: u32 ) -> ControlResult<()>
Sets payload transfer count.
sourcepub fn payload_final_transfer1_size<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl
) -> ControlResult<u32>
pub fn payload_final_transfer1_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u32>
Payload final transfer1 size.
sourcepub fn set_payload_final_transfer1_size<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl,
size: u32
) -> ControlResult<()>
pub fn set_payload_final_transfer1_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl, size: u32 ) -> ControlResult<()>
Sets payload final transfer1 size.
sourcepub fn payload_final_transfer2_size<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl
) -> ControlResult<u32>
pub fn payload_final_transfer2_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u32>
Payload final transfer1 size.
sourcepub fn set_payload_final_transfer2_size<Ctrl: DeviceControl + ?Sized>(
&self,
device: &mut Ctrl,
size: u32
) -> ControlResult<()>
pub fn set_payload_final_transfer2_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl, size: u32 ) -> ControlResult<()>
Set payload final transfer1 size.