|
RGB Sunglasses Animation Extension API fw-v3.8.1-1-geacf2f0
rgbx ABI + C++ wrapper for sandboxed .llext animations
|
RGBX v2 memoryless WebAssembly guest ABI. More...
#include <stdint.h>Go to the source code of this file.
Macros | |
| #define | RGBX_V2_ABI_VERSION 2u |
| RGBX WebAssembly ABI version described by this header. | |
| #define | RGBX_V2_WIDTH 40u |
| Fixed display width in pixels. | |
| #define | RGBX_V2_HEIGHT 12u |
| Fixed display height in pixels. | |
| #define | RGBX_V2_PIXEL_COUNT (RGBX_V2_WIDTH * RGBX_V2_HEIGHT) |
| Total number of pixels in one complete frame. | |
| #define | RGBX_V2_PIXELS_PER_SPAN 8u |
| Number of consecutive pixels emitted by either span import. | |
| #define | RGBX_V2_MAX_PARAMS 16u |
| Maximum number of numeric parameter slots. | |
| #define | RGBX_V2_MAX_STRING_PARAMS 4u |
| Maximum number of string parameter slots. | |
| #define | RGBX_V2_STRING_PARAM_SIZE 32u |
| Storage bytes per string slot, including the NUL terminator. | |
| #define | RGBX_V2_AUDIO_BAND_COUNT 4u |
| Number of coarse Q16 audio-energy bands. | |
| #define | RGBX_V2_AUDIO_DISPLAY_BUCKET_COUNT 20u |
| Number of fine-grained Q16 audio display buckets. | |
| #define | RGBX_V2_IMU_AXIS_COUNT 3u |
| Number of axes in each IMU vector. | |
| #define | RGBX_V2_DIAGNOSTIC_COUNT 4u |
| Maximum numeric diagnostics emitted by one tick. | |
| #define | RGBX_V2_MODULE_MAX_BYTES 2048u |
| Maximum Wasm payload bytes in the released memoryless profile. | |
| #define | RGBX_V2_MAX_FUNCTIONS 8u |
| Maximum functions, imported plus defined, in one module. | |
| #define | RGBX_V2_MAX_GLOBALS 8u |
| Maximum globals a module may define. | |
| #define | RGBX_V2_MAX_LOCALS_PER_FUNCTION 32u |
| Maximum locals declared by one function body. | |
| #define | RGBX_V2_MIN_IMPORTS 2u |
| Fewest host imports a module may declare. | |
| #define | RGBX_V2_MAX_IMPORTS 5u |
| Most host imports a module may declare. | |
| #define | RGBX_V2_MAX_PARAM_CALLS_PER_TICK 16u |
| Maximum rgbx_v2_param_u32() calls admitted in one tick. | |
| #define | RGBX_V2_MAX_INPUT_CALLS_PER_TICK 64u |
| Maximum rgbx_v2_input_u32() calls admitted in one tick. | |
| #define | RGBX_V2_SPAN_CALLS_PER_TICK (RGBX_V2_PIXEL_COUNT / RGBX_V2_PIXELS_PER_SPAN) |
| Span calls that cover one complete frame exactly once. | |
| #define | RGBX_V2_SECTION_ALLOWED_MASK 0x04ceu |
| Bitmask of WebAssembly section ids the profile admits. | |
| #define | RGBX_V2_SECTION_REQUIRED_MASK 0x048eu |
| Bitmask of WebAssembly section ids every module must carry. | |
| #define | RGBX_V2_CAPABILITY_BUTTONS (1u << 0) |
| Permission bit for pressed-button snapshots. | |
| #define | RGBX_V2_CAPABILITY_IMU (1u << 1) |
| Permission bit for accelerometer and gyroscope snapshots. | |
| #define | RGBX_V2_CAPABILITY_AUDIO (1u << 2) |
| Permission bit for audio energies and beat snapshots. | |
| #define | RGBX_V2_CAPABILITY_ALL (RGBX_V2_CAPABILITY_BUTTONS | RGBX_V2_CAPABILITY_IMU | RGBX_V2_CAPABILITY_AUDIO) |
| Mask of every sensor capability defined by RGBX v2. | |
| #define | RGBX_V2_EXTERN_C extern "C" |
| C-linkage declaration helper used by the flat guest ABI. | |
| #define | RGBX_V2_IMPORT(name) |
| Host-parser no-op form of RGBX_V2_IMPORT(). | |
| #define | RGBX_V2_EXPORT(name) |
| Host-parser no-op form of RGBX_V2_EXPORT(). | |
Enumerations | |
| enum | rgbx_v2_input_kind { RGBX_V2_INPUT_AUDIO_BAND_Q16 = 0 , RGBX_V2_INPUT_AUDIO_DISPLAY_Q16 = 1 , RGBX_V2_INPUT_AUDIO_BEAT_MASK = 2 , RGBX_V2_INPUT_BUTTONS_PRESSED = 3 , RGBX_V2_INPUT_ACCEL_MILLI = 4 , RGBX_V2_INPUT_GYRO_MILLI = 5 , RGBX_V2_INPUT_STRING_LENGTH = 6 , RGBX_V2_INPUT_STRING_BYTE_SUM = 7 } |
| Selector passed to rgbx_v2_input_u32(). More... | |
Functions | |
| 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_set_good_moment (uint32_t value) RGBX_V2_IMPORT("set_good_moment") |
| Publish this frame's shuffle-safe boundary signal. | |
| 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. | |
| 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_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 memoryless WebAssembly guest ABI.
SPDX-License-Identifier: MIT Copyright (c) 2026 Stuart Alldritt
This header describes guest imports and export annotations only. It exposes no Zephyr types, native pointers, WASI, libc, filesystem, network, or BLE surface. The firmware independently validates the compiled module before it links any import.
| #define RGBX_V2_MAX_GLOBALS 8u |
Maximum globals a module may define.
Imported globals are refused.
| enum rgbx_v2_input_kind |
Selector passed to rgbx_v2_input_u32().
| RGBX_V2_EXTERN_C void rgbx_v2_debug_u32 | ( | uint32_t | tag, |
| uint32_t | value ) |
Append one bounded numeric diagnostic to the current frame.
| tag | Guest-defined numeric tag. |
| value | Guest-defined numeric value. |
| RGBX_V2_EXTERN_C uint32_t rgbx_v2_input_u32 | ( | uint32_t | kind, |
| uint32_t | index ) |
Read one sensor, button, or bounded string-summary value.
| kind | One rgbx_v2_input_kind value. |
| index | Kind-specific index documented by rgbx_v2_input_kind. |
| RGBX_V2_EXTERN_C uint32_t rgbx_v2_param_u32 | ( | uint32_t | id | ) |
Read one numeric parameter from the immutable tick snapshot.
| id | Numeric parameter slot, from zero through 15. |
| RGBX_V2_EXTERN_C void rgbx_v2_set_good_moment | ( | uint32_t | value | ) |
Publish this frame's shuffle-safe boundary signal.
| value | Zero or one; exactly one call is required when imported. |
| 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 ) |
Emit eight luma values interpolated between two RGB24 colors.
| first_pixel | Ordered linear offset: 0, 8, ..., 472. |
| foreground | Foreground 0x00RRGGBB color selected at luma 255. |
| background | Background 0x00RRGGBB color selected at luma zero. |
| luma0 | First luma in the closed range 0..255. |
| luma1 | Second luma in the closed range 0..255. |
| luma2 | Third luma in the closed range 0..255. |
| luma3 | Fourth luma in the closed range 0..255. |
| luma4 | Fifth luma in the closed range 0..255. |
| luma5 | Sixth luma in the closed range 0..255. |
| luma6 | Seventh luma in the closed range 0..255. |
| luma7 | Eighth luma in the closed range 0..255. |
| 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 ) |
Emit eight consecutive native RGB24 colors.
| first_pixel | Ordered linear offset: 0, 8, ..., 472. |
| color0 | First 0x00RRGGBB color. |
| color1 | Second 0x00RRGGBB color. |
| color2 | Third 0x00RRGGBB color. |
| color3 | Fourth 0x00RRGGBB color. |
| color4 | Fifth 0x00RRGGBB color. |
| color5 | Sixth 0x00RRGGBB color. |
| color6 | Seventh 0x00RRGGBB color. |
| color7 | Eighth 0x00RRGGBB color. |