ad9959

Struct ProfileSerializer

Source
pub struct ProfileSerializer { /* private fields */ }
Expand description

Represents a means of serializing a DDS profile for writing to a stream.

Implementations§

Source§

impl ProfileSerializer

Source

pub fn new(mode: Mode) -> Self

Construct a new serializer.

§Args
  • mode - The communication mode of the DDS.
Source

pub fn push( &mut self, channels: Channel, ftw: Option<u32>, pow: Option<u14>, acr: Option<Acr>, )

Update a number of channels with the requested profile.

§Args
  • channels - A set of channels to apply the configuration to.
  • ftw - If provided, indicates a frequency tuning word for the channels.
  • pow - If provided, indicates a phase offset word for the channels.
  • acr - If provided, indicates the amplitude control register for the channels. The ACR should be stored in the 3 LSB of the word. Note that if amplitude scaling is to be used, the “Amplitude multiplier enable” bit must be set.
Source

pub fn finalize(&mut self) -> &[u32]

Get the serialized profile as a slice of 32-bit words.

§Note

The serialized profile will be padded to the next 32-bit word boundary by adding dummy writes to the CSR or LSRR registers.

§Returns

A slice of u32 words representing the serialized profile.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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, U> Into<U> for T
where 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.