import { Channel } from "https://deno.land/x/pita_api@0.9.1/src/channel.ts";
Interface for Redpitaya fast analog IOs.
Examples
Example 1
Example 1
const adc1 = new Channel({
mode: IOMode.RO,
bitness: 16n,
frequency: Frequency.SMP_125M,
connection: redpitaya.connection('signals', ChannelPin.adc1),
})
Constructors
new
Channel(unnamed 0: { mode: Mode; frequency: Frequency; bitness: Bitness<16>; connection: RPConnection<"signals", ChannelId>; })Type Parameters
Mode extends IOMode
Methods
getBitness(): Bitness<16>
Get the bitness of the Channel.
Get the clock frequency of the Channel.
Get the trigger of the Channel.
readIter<Size extends number>(bufferSize: Size): AsyncGenerator<Mode extends IOMode.WO ? never : Tuple<number, Size>, void, void>
Continuously read a buffered slice from adc input.
readSlice<Size extends number>(bufferSize: Size): Promise<Mode extends IOMode.WO ? never : Tuple<number, Size>>
Reads a buffered slice from adc input.
setBitness(bitness: Bitness<16>)
Set the bitness of the Channel.
setFrequency(frequency: Frequency)
Set the clock frequency of the Channel.
setTrigger(trigger: Trigger)
Set the trigger of the Channel.
writeIter<Size extends number>(bufferSize: Size): AsyncGenerator<(data: SignalDatas) => Promise<void>, void, void>
Continously write a slice of points to dac.
writeSlice(buffer: number[]): Promise<Mode extends IOMode.RO ? never : void>
Writes a slice of points to dac.