Handle
Methods
Types
Level
Level::as_str() gives "high" or "low"; Level::is_high() gives a bool.
WaitForLevelOptions
None, meaning “use the box’s default”. Unset fields are
omitted from the request entirely rather than sent as null.
Method Reference
input() -> Result<Level>
Read the current level on the pin.
Level::High or Level::Low.
output(level: Level) -> Result<()>
Drive the output to level.
output_high() -> Result<()> and output_low() -> Result<()>
Convenience wrappers over output().
toggle() -> Result<Level>
Invert the output.
Returns: the level the pin is at after toggling, not before.
wait_for_level(level: Level, timeout_s: f64) -> Result<f64>
Block until the input reaches level, or timeout_s elapses.
Returns:
f64 — seconds elapsed before the level was reached. A pin already at
the requested level returns almost immediately (order of a millisecond).
The wait happens on the box, so the timing is not distorted by network latency
and a short pulse is not missed between polls. The client widens its own HTTP budget
to timeout_s + 20s so the device, not the transport, decides when to give up.
A wait that times out comes back as
Error::Box, not Error::Timeout — the box
completed the request and reported that the level was never reached. The message
reads GPIO 'gpio24' did not reach level 1 within 2.0s. Error::Timeout means the
HTTP request itself expired, which is a different problem.wait_for_level_with(level: Level, opts: &WaitForLevelOptions) -> Result<f64>
Full control over the wait, including waiting forever.
Examples
Simulate a button press and check the DUT reacts
Measure boot time
Supported Hardware
Notes
- One net is one pin. Driving
gpio1says nothing aboutgpio2. - A pin is an input or an output depending on what you last asked of it. Calling
input()on a pin you have been driving reads back your own output. - GPIO nets are box-side pins: they drive signals into the DUT or read signals out of it. They are not DUT pins.
- On FTDI parts, gpio is async bitbang and works on all four channels, unlike the MPSSE protocols (debug, spi, i2c) which are limited to channels A and B.
- Bench pins sometimes gate instrument power rather than DUT signals. Read a pin’s net name before driving it.

