Skip to main content

Logic Analyzer Functions

dev.io.logic_analyzer - wire path i\b - generated from fwMenuLogicAnalyzer.

setup_logic_analyzer

configure. Configures the logic analyzer capture.

Configure Logic Analyzer

Configures a digital logic capture on a contiguous range of GPIO pins, with an optional edge trigger and auto-rearm.

Arguments
#NameDescription
1sampleRateNsSample period in nanoseconds (time between samples). Smaller = faster.
2sampleCountTotal number of samples to capture per run.
3pinStartFirst GPIO pin in the capture range (inclusive).
4pinStopLast GPIO pin in the capture range (inclusive). Bits per sample = pinStop - pinStart + 1.
5triggerPinGPIO pin used as the trigger source.
6triggerTypeTrigger mode (see below).
7rearm0 = single-shot, 1 = automatically rearm after each capture.
Trigger Types
  • 0 — Falling edge on triggerPin
  • 1 — Rising edge on triggerPin
  • 2 — None (one-shot, fires immediately on start)
  • 3 — Continuous (free-running capture)
Returns
  • successtrue if the configuration was accepted, false otherwise.
Example

Capture 4096 samples on GPIO 0–7 at 1 µs/sample, triggering on a rising edge of GPIO 2, with auto-rearm enabled:

c 1000 4096 0 7 2 1 1
Notes
  • Issue s (start) after configuring to begin capture, and e (stop) to halt.
  • For analog capture, configure separately with a.

Wire command: i\b\c

ArgWire type
sample_rate_nsdecS32
sample_countdecS32
pin_startdecS32
pin_stopdecS32
trigger_pindecS32
trigger_typedecS32
rearmdecS32

Returns: none (Ok/Err only)

dev.io.logic_analyzer.setup_logic_analyzer(sample_rate_ns: int, sample_count: int, pin_start: int, pin_stop: int, trigger_pin: int, trigger_type: int, rearm: int) -> Result
ow_status ow_io_logic_analyzer_setup_logic_analyzer(ow_device* dev, int32_t sample_rate_ns, int32_t sample_count, int32_t pin_start, int32_t pin_stop, int32_t trigger_pin, int32_t trigger_type, int32_t rearm);
dev.io().logic_analyzer().setup_logic_analyzer(sample_rate_ns: i32, sample_count: i32, pin_start: i32, pin_stop: i32, trigger_pin: i32, trigger_type: i32, rearm: i32) -> Result<(), OwError>

The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).

dev.io.logic_analyzer.setup_logic_analyzer(sample_rate_ns, sample_count, pin_start, pin_stop, trigger_pin, trigger_type, rearm) # check dev.ok

setup_analog

configure analog. Configures the analog capture inputs.

Wire command: i\b\a

ArgWire type
analog_maskdecS32
analog_rate_nsdecS32
analog_resdecS32

Returns: none (Ok/Err only)

dev.io.logic_analyzer.setup_analog(analog_mask: int, analog_rate_ns: int, analog_res: int) -> Result
ow_status ow_io_logic_analyzer_setup_analog(ow_device* dev, int32_t analog_mask, int32_t analog_rate_ns, int32_t analog_res);
dev.io().logic_analyzer().setup_analog(analog_mask: i32, analog_rate_ns: i32, analog_res: i32) -> Result<(), OwError>

The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).

dev.io.logic_analyzer.setup_analog(analog_mask, analog_rate_ns, analog_res) # check dev.ok

start

start. Starts logic analyzer capture.

Wire command: i\b\s

Returns: none (Ok/Err only)

dev.io.logic_analyzer.start() -> Result
ow_status ow_io_logic_analyzer_start(ow_device* dev);
dev.io().logic_analyzer().start() -> Result<(), OwError>

The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).

dev.io.logic_analyzer.start() # check dev.ok

stop

stop. Stops logic analyzer capture.

Wire command: i\b\e

Returns: none (Ok/Err only)

dev.io.logic_analyzer.stop() -> Result
ow_status ow_io_logic_analyzer_stop(ow_device* dev);
dev.io().logic_analyzer().stop() -> Result<(), OwError>

The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).

dev.io.logic_analyzer.stop() # check dev.ok

trigger

trigger. Manually triggers the logic analyzer.

Wire command: i\b\t

ArgWire type
trigger_typedecS32

Returns: none (Ok/Err only)

dev.io.logic_analyzer.trigger(trigger_type: int) -> Result
ow_status ow_io_logic_analyzer_trigger(ow_device* dev, int32_t trigger_type);
dev.io().logic_analyzer().trigger(trigger_type: i32) -> Result<(), OwError>

The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).

dev.io.logic_analyzer.trigger(trigger_type) # check dev.ok