opentitanlib::io::gpio

Enum DacBangEntry

Source
pub enum DacBangEntry<'wr> {
    Write(&'wr [f32]),
    WriteOwned(Box<[f32]>),
    Delay(u32),
    Linear(u32),
}

Variants§

§

Write(&'wr [f32])

Represents a sequence of volt values. If N pin is being driven, then samples are interleaved such that at first, the first N values are applied, one to each of the pins, at next tick the next N values are applied, and so on, with a particular delay between each tick given by the clock_tick argument to run().

§

WriteOwned(Box<[f32]>)

Same as Write, but this DacBangEntry owns the data.

§

Delay(u32)

Represents a delay of the given number of clock ticks in which the output levels are held as indicated by the last values of the preceding Write entry.

A delay of zero is invalid. A delay of one tick is equivalent to not specifying any Delay between two Write blocks, which is also equivalent to concatenating the two into a single Write block.

§

Linear(u32)

Represents a time span of the given number of clock ticks during which the voltage linearly transitions from the previous to the subsequent value.

A value of zero is invalid. A value of one tick is equivalent to not specifying any delay between two Write blocks. A value of two will result in a single intermediate sample halfway between the two voltages. In general, a value of N will result in N-1 intermediate samples being inserted at this point.

Auto Trait Implementations§

§

impl<'wr> Freeze for DacBangEntry<'wr>

§

impl<'wr> RefUnwindSafe for DacBangEntry<'wr>

§

impl<'wr> Send for DacBangEntry<'wr>

§

impl<'wr> Sync for DacBangEntry<'wr>

§

impl<'wr> Unpin for DacBangEntry<'wr>

§

impl<'wr> UnwindSafe for DacBangEntry<'wr>

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> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V