18#define RGBX_V2_ABI_VERSION 2u
20#define RGBX_V2_WIDTH 40u
22#define RGBX_V2_HEIGHT 12u
24#define RGBX_V2_PIXEL_COUNT (RGBX_V2_WIDTH * RGBX_V2_HEIGHT)
26#define RGBX_V2_PIXELS_PER_SPAN 8u
28#define RGBX_V2_MAX_PARAMS 16u
30#define RGBX_V2_MAX_STRING_PARAMS 4u
32#define RGBX_V2_STRING_PARAM_SIZE 32u
34#define RGBX_V2_AUDIO_BAND_COUNT 4u
36#define RGBX_V2_AUDIO_DISPLAY_BUCKET_COUNT 20u
38#define RGBX_V2_IMU_AXIS_COUNT 3u
40#define RGBX_V2_DIAGNOSTIC_COUNT 4u
42#define RGBX_V2_MODULE_MAX_BYTES 2048u
56#define RGBX_V2_MAX_FUNCTIONS 8u
58#define RGBX_V2_MAX_GLOBALS 8u
60#define RGBX_V2_MAX_LOCALS_PER_FUNCTION 32u
62#define RGBX_V2_MIN_IMPORTS 2u
64#define RGBX_V2_MAX_IMPORTS 5u
66#define RGBX_V2_MAX_PARAM_CALLS_PER_TICK 16u
68#define RGBX_V2_MAX_INPUT_CALLS_PER_TICK 64u
70#define RGBX_V2_SPAN_CALLS_PER_TICK (RGBX_V2_PIXEL_COUNT / RGBX_V2_PIXELS_PER_SPAN)
80#define RGBX_V2_SECTION_ALLOWED_MASK 0x04ceu
82#define RGBX_V2_SECTION_REQUIRED_MASK 0x048eu
85#define RGBX_V2_CAPABILITY_BUTTONS (1u << 0)
87#define RGBX_V2_CAPABILITY_IMU (1u << 1)
89#define RGBX_V2_CAPABILITY_AUDIO (1u << 2)
91#define RGBX_V2_CAPABILITY_ALL \
92 (RGBX_V2_CAPABILITY_BUTTONS | RGBX_V2_CAPABILITY_IMU | RGBX_V2_CAPABILITY_AUDIO)
106#if defined(__cplusplus)
108#define RGBX_V2_EXTERN_C extern "C"
111#define RGBX_V2_EXTERN_C extern
119#define RGBX_V2_IMPORT(name) __attribute__((import_module("rgbx_v2"), import_name(name)))
124#define RGBX_V2_EXPORT(name) __attribute__((export_name(name)))
127#define RGBX_V2_IMPORT(name)
129#define RGBX_V2_EXPORT(name)
173 uint32_t color2, uint32_t color3, uint32_t color4,
174 uint32_t color5, uint32_t color6, uint32_t color7)
192 uint32_t background, uint32_t luma0, uint32_t luma1,
193 uint32_t luma2, uint32_t luma3, uint32_t luma4,
194 uint32_t luma5, uint32_t luma6, uint32_t luma7)
207#undef RGBX_V2_EXTERN_C
#define RGBX_V2_IMPORT(name)
Host-parser no-op form of RGBX_V2_IMPORT().
Definition rgbx_v2.h:127
RGBX_V2_EXTERN_C uint32_t rgbx_v2_param_u32(uint32_t id) RGBX_V2_IMPORT("param_u32")
Read one numeric parameter from the immutable tick snapshot.
RGBX_V2_EXTERN_C uint32_t rgbx_v2_input_u32(uint32_t kind, uint32_t index) RGBX_V2_IMPORT("input_u32")
Read one sensor, button, or bounded string-summary value.
RGBX_V2_EXTERN_C void rgbx_v2_debug_u32(uint32_t tag, uint32_t value) RGBX_V2_IMPORT("debug_u32")
Append one bounded numeric diagnostic to the current frame.
#define RGBX_V2_EXTERN_C
C-linkage declaration helper used by the flat guest ABI.
Definition rgbx_v2.h:108
RGBX_V2_EXTERN_C void rgbx_v2_set_luma_span8(uint32_t first_pixel, uint32_t foreground, uint32_t background, uint32_t luma0, uint32_t luma1, uint32_t luma2, uint32_t luma3, uint32_t luma4, uint32_t luma5, uint32_t luma6, uint32_t luma7) RGBX_V2_IMPORT("set_luma_span8")
Emit eight luma values interpolated between two RGB24 colors.
RGBX_V2_EXTERN_C void rgbx_v2_set_span8(uint32_t first_pixel, uint32_t color0, uint32_t color1, uint32_t color2, uint32_t color3, uint32_t color4, uint32_t color5, uint32_t color6, uint32_t color7) RGBX_V2_IMPORT("set_span8")
Emit eight consecutive native RGB24 colors.
rgbx_v2_input_kind
Selector passed to rgbx_v2_input_u32().
Definition rgbx_v2.h:95
@ RGBX_V2_INPUT_AUDIO_DISPLAY_Q16
Q16 display energy; index 0..19.
Definition rgbx_v2.h:97
@ RGBX_V2_INPUT_BUTTONS_PRESSED
Pressed-button mask; index must be zero.
Definition rgbx_v2.h:99
@ RGBX_V2_INPUT_AUDIO_BEAT_MASK
Beat bit mask; index must be zero.
Definition rgbx_v2.h:98
@ RGBX_V2_INPUT_GYRO_MILLI
Signed gyroscope axis; index 0..2.
Definition rgbx_v2.h:101
@ RGBX_V2_INPUT_AUDIO_BAND_Q16
Q16 energy; index 0..3.
Definition rgbx_v2.h:96
@ RGBX_V2_INPUT_STRING_LENGTH
String length; string slot 0..3.
Definition rgbx_v2.h:102
@ RGBX_V2_INPUT_ACCEL_MILLI
Signed accelerometer axis; index 0..2.
Definition rgbx_v2.h:100
@ RGBX_V2_INPUT_STRING_BYTE_SUM
Unsigned byte sum; string slot 0..3.
Definition rgbx_v2.h:103
RGBX_V2_EXTERN_C void rgbx_v2_set_good_moment(uint32_t value) RGBX_V2_IMPORT("set_good_moment")
Publish this frame's shuffle-safe boundary signal.