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

source

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.

source

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.

source

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.

source

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.

source

pub fn is_stream_enable<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<bool>

Returns true if stream is enabled.

source

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.

source

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.

source

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.

source

pub fn maximum_leader_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u32>

Maximum leader size in any device configuration.

source

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.

source

pub fn maximum_trailer_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u32>

Maximum trailer size in any device configuration.

source

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.

source

pub fn payload_transfer_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u32>

Payload transfer size.

source

pub fn set_payload_transfer_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl, size: u32 ) -> ControlResult<()>

Set payload transfer size.

source

pub fn payload_transfer_count<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u32>

Payload transfer count.

source

pub fn set_payload_transfer_count<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl, size: u32 ) -> ControlResult<()>

Sets payload transfer count.

source

pub fn payload_final_transfer1_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u32>

Payload final transfer1 size.

source

pub fn set_payload_final_transfer1_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl, size: u32 ) -> ControlResult<()>

Sets payload final transfer1 size.

source

pub fn payload_final_transfer2_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl ) -> ControlResult<u32>

Payload final transfer1 size.

source

pub fn set_payload_final_transfer2_size<Ctrl: DeviceControl + ?Sized>( &self, device: &mut Ctrl, size: u32 ) -> ControlResult<()>

Set payload final transfer1 size.

Trait Implementations§

source§

impl Clone for Sirm

source§

fn clone(&self) -> Sirm

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Sirm

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for Sirm

Auto Trait Implementations§

§

impl RefUnwindSafe for Sirm

§

impl Send for Sirm

§

impl Sync for Sirm

§

impl Unpin for Sirm

§

impl UnwindSafe for Sirm

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more