Skip to content

v0.4.2: QEMU input

Choose a tag to compare

@rvben rvben released this 03 Jul 10:36
v0.4.2
7e72842

Highlights

Input injection for emulated firmware (tier 2)

tap, swipe, gpio, and button now work on qemu-backed targets whose firmware runs esprite's tiny esprite_qemu_agent component (one task on UART1, wired by esprite to a second serial chardev):

  • The QEMU fork emulates no GPIO or touch hardware (its C3 gpio model reflects nothing into gpio_get_level), so cooperating firmware polls the agent's event-counter APIs - counters, not live state, so a fast host tap or a short pulse is never missed.
  • Board specs grew "agent": true and a "buttons" array; spec buttons render as clickable bezel nubs in --window (view-only on qemu for now) and are pressable by label.
  • button <label> works on every backend now: any board button is pressable by its silk-screen name (e.g. button BOOT on the CYD).
  • New error kind agent_failed (exit 10) when the guest agent is absent or unresponsive.

Scenarios run on qemu targets, with the first emulator goldens

scenario boots through the backend seam and gates per step:

  • New settle {ms} step: the portable time verb (native pumps the loop, qemu pumps the child).
  • New pixel {x,y,value,timeout_ms} step: a framebuffer assertion with a retry deadline - deterministic against wall-clock guests, exact on flat-color fixtures.
  • scenarios/qemu_esp32c3_rgb.json taps and presses a real emulated guest and its screenshots byte-match committed goldens (make qemu-goldens regenerates).
  • steps and expect stay native-only and say so; serial matches against the backend's capture on both.

Binaries below carry the generic native targets plus both qemu board specs; the waveshare_amoled_18 target needs a source build against a firmware checkout (see README). esprite is alpha software; interfaces may change.