gfx-compat-blit
:::warning [UNTESTED]
native_sim build-and-run only; not yet run on a bench SoM.
:::
Fill and blit an RGB565 buffer through the gfx_compat shim's pure-C software fallback.
Source: examples/display/gfx-compat-blit/.
:::note gfx_compat is in-tree SDK code, not a third-party library
Despite sitting alongside the third-party library examples, gfx_compat is the SDK's own maintainer-written RGB565 fill/blit shim at src/lib/gfx_compat/, wired in by libraries: [gfx_compat].
:::
What it does
- Fills a 16×16 RGB565 canvas and a 4×4 patch with
gfx_compat_fill(). - Blits the patch into the canvas at (6, 6), row by row, with
gfx_compat_blit(). - Prints an additive checksum over all 256 pixels.
Just RAM buffers — no target hardware dependency, so the example needs no peripherals or chips.
Hardware-accelerated backends
The pure-C CONFIG_ALP_GFX_COMPAT_SW path is the only backend implemented today. Alif GPU2D, DMA2D, and SPI-DMA backends are status: planned. When they land, this example's board.yaml will not need to change — the shim picks the backend up from the SoM's capabilities.
board.yaml
libraries:
- name: gfx-compat
cores: [m55_hp]
som:
sku: E1M-AEN801
preset: e1m-evk
cores:
m55_hp:
app: ./src
peripherals: []
diagnostics:
log_level: info
Expected output
[gfx-compat-blit] canvas 16x16, patch 4x4 at (6,6)
[gfx-compat-blit] checksum=0x00e8fe00
[gfx-compat-blit] done
See also
u8g2-oled-draw— the monochrome framebuffer counterpart- Examples overview