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.