This is the development version of the documentation. It may change before the next release. See 0.14.x for the latest release.
EmulateGpioIn
EmulateGpioIn is a command that asserts the four GPIO input terminals of the devices from software.
The effective value the FPGA sees is the logical OR of the physical terminal input and EmulateGpioIn.
EmulateGpioIn { values };EmulateGpioIn(values)new EmulateGpioIn(values);| Field | Type | Default | Description |
|---|---|---|---|
values |
[bool; 4] |
all false |
Whether to assert each of inputs 0..3 (true asserts) |
Example
Section titled “Example”use autd3_rs::commands::{Clear, EmulateGpioIn, Synchronize};use autd3_rs::geometry::{Autd3, Geometry};use autd3_rs::Client;use autd3_rs::udp::TransportOption;
let geometry = Geometry::new(vec![Autd3::default()]);let option = TransportOption::default();let mut client = Client::open(&geometry, &option).await?;client.send(Clear).await?;client.send(Synchronize).await?;
client.send(EmulateGpioIn { values: [true, false, false, false],}).await?;import asyncio
from autd3 import Client, TransportOptionfrom autd3.commands import Clear, EmulateGpioIn, Synchronizefrom autd3.geometry import Autd3, Geometry
async def main() -> None: geometry = Geometry([Autd3()]) with await Client.open(geometry, TransportOption()) as client: await client.send(Clear()) await client.send(Synchronize())
await client.send(EmulateGpioIn([True, False, False, False]))
asyncio.run(main())using System.Threading.Tasks;using AUTD3;
var geometry = new Geometry(new[] { new Autd3() });using var client = await Client.OpenAsync(geometry, new TransportOption());await client.SendAsync(new Clear());await client.SendAsync(new Synchronize());
await client.SendAsync(new EmulateGpioIn(new[] { true, false, false, false }));