Event Vocabulary
The structured events every board shares. Outbound events arrive through the onEvent callback as { kind, payload } objects; inbound events are sent with dispatch(kind, payloadJson). Peripheral-specific kinds are documented on each peripheral page.
Outbound (emulator → host)
audio.samplesInterleaved PCM audio samples were produced.
Payload
| Field | Type | Description |
|---|---|---|
sample_count | u64 | Number of samples in the batch. |
gpio.changeA GPIO output pin changed level.
Payload
| Field | Type | Description |
|---|---|---|
level | boolean | New logical level (`true` = high). |
pin | u32 | Pin number within the port. |
port | u32 | GPIO port index. |
irq.lowerAn interrupt line was deasserted.
Payload
| Field | Type | Description |
|---|---|---|
line | u32 | NVIC IRQ number (Cortex-M) or GIC SPI number (Cortex-A). |
irq.raiseAn interrupt line was asserted (pended).
Payload
| Field | Type | Description |
|---|---|---|
line | u32 | NVIC IRQ number (Cortex-M) or GIC SPI number (Cortex-A). |
uart.txBytes transmitted by the guest on a UART/serial port.
Payload
| Field | Type | Description |
|---|---|---|
bytes | bytes | Transmitted bytes. |
port | u32 | Logical UART port index (0 = primary console). |
video.frameA completed display frame is available; fetch pixels via the framebuffer API.
Payload
| Field | Type | Description |
|---|---|---|
height | u32 | Frame height in pixels. |
width | u32 | Frame width in pixels. |
Inbound (host → emulator)
joypadGame controller state for console boards.
Payload
| Field | Type | Description |
|---|---|---|
bits | u32 | Packed button bitmask. |
uart.rxBytes from the host (terminal keystrokes) delivered to the guest UART RX line.
Payload
| Field | Type | Description |
|---|---|---|
bytes | bytes | Received bytes. |