import { IO } from "https://deno.land/x/pita_api@0.9.1/src/io.ts";
Interface for Redpitaya digital and slow analog IOs.
Examples
Example 1
Example 1
const dio6p = new IO({
mode: IOMode.RW,
type: IOType.Digital,
connection: redpitaya.connection('parameters', Pin.digital.io6p),
})
Methods
getActive(): boolean
Get the state of the IO. Only for Analog IOs.
getBitness(): Bitness<12>
Get the bitness of the IO. Only for Analog IOs.
Reads a value from IO.
readIter()
Continuously read a value from IO.
setActive(active: boolean)
Set the state of the IO. Only for Analog IOs.
setBitness(bitness: Bitness<12>)
Set the bitness of the IO. Only for Analog IOs.
write(value: Mode extends IOMode.RO ? never : Type extends IOType.Digital ? boolean : number): Promise<void>
Writes a value from IO.
Continuously write a value to IO.