Skip to main content

<alp/display.h> — Display Subsystem

Raw display control. For widget-level UIs use <alp/gui.h> (LVGL).

#include <alp/display.h>

Quick example

alp_display_t *disp = alp_display_open(&(alp_display_config_t){
.display_id = 0, // Studio-resolved display instance
});

// Read geometry + pixel format before drawing.
alp_display_caps_t caps = { 0 };
alp_display_get_caps(disp, &caps);

alp_display_clear(disp);

// Push a rectangular framebuffer region. `pixels` byte size is
// implied by w * h * bytes-per-pixel-for-caps.format.
alp_display_blit(disp, /* x */ 0, /* y */ 0,
/* w */ caps.width, /* h */ caps.height, pixels);

alp_display_close(disp);

The raw surface is pixel-oriented: there is no text-drawing primitive. To render strings or widgets, drive <alp/gui.h> (LVGL) instead.

Supported panels

Driver chips supported out of the box:

  • SSD1306 — monochrome 128×64 OLED (E1M EVK)
  • SSD1331 — small colour OLED (E1M EVK)
  • SSD1683 / UC8175 — e-paper (v0.3+)
  • ST7789 / ILI9341 — small TFT (v0.3+)

All are opt-in via board.yaml's chips: array.

Backend status

As of v0.9 a real Zephyr display backend exists (issue #23, ADR-0017 Tier 1). It wraps the upstream Zephyr display_* driver class, so any panel that already has an upstream Zephyr display driver resolves through the SDK surface via the new alp-display0..3 devicetree aliases.

  • Gate: CONFIG_ALP_SDK_DISPLAY_ZEPHYR_DRV (default y when CONFIG_DISPLAY is on), registered at priority 50.
  • Fallback: the priority-0 NOT_IMPLEMENTED stub remains, so the surface stays linkable on builds without a display. Boards with no display node degrade cleanly — ops return ALP_ERR_NOT_READY / ALP_ERR_NOT_IMPLEMENTED rather than faulting.
  • Bounds: alp_display_blit rects are bounds-checked against the panel geometry; a rect outside the display returns ALP_ERR_OUT_OF_RANGE.
  • Coverage: verified on native_sim. No silicon run yet — the V2N DSI / parallel-RGB framebuffer path and the Alif LCD-IF path are still tracked under issue #23.

The LVGL re-export path (<alp/gui.h>) still owns the zephyr,display chosen node.

See also

Questions about this page? Discuss in Community Forum