ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
display_backend_iface Struct Reference

Opaque to applications – backends implement this internally and export a const instance through their own header. More...

#include <ra8_display_pal_internal.h>

Data Fields

ra8_err_t(* init )(const display_cfg_t *cfg, void **out_ctx)
 Bring the backend up against cfg and return its private context pointer through *out_ctx.
ra8_err_t(* get_caps )(const void *ctx, display_caps_t *out)
 Fill in *out with the backend's capabilities.
ra8_err_t(* get_framebuffer )(void *ctx, display_fb_t *out)
 Hand out the framebuffer descriptor for paint loops.
ra8_err_t(* flush )(void *ctx, display_rect_t rect, display_refresh_hint_t hint)
 Commit pending FB changes to the panel.
ra8_err_t(* clear )(void *ctx, uint32_t color)
 Clear the framebuffer to color.
ra8_err_t(* deinit )(void *ctx)
 Tear down.

Detailed Description

Opaque to applications – backends implement this internally and export a const instance through their own header.

One vtable per backend.

Apps never construct an display_backend_iface_t themselves; they reference the const instance their chosen backend exports (e.g. k_display_backend_lcd_ra8_glcdc) and pass its address through display_cfg_t.iface.

Since
0.1.0

Each callback receives the backend's opaque ctx so backends can keep their state private.

Backends fill in a static const display_backend_iface_t in their TU and export its address through their public ra8_display_pal_<name>.h header. The dispatcher in ra8_display_pal.c is the only consumer at run time.

Invariant
All function pointers are non-NULL.
Since
0.1.0

Definition at line 55 of file ra8_display_pal_internal.h.

Field Documentation

◆ clear

ra8_err_t(* display_backend_iface::clear) (void *ctx, uint32_t color)

Clear the framebuffer to color.

Definition at line 76 of file ra8_display_pal_internal.h.

◆ deinit

ra8_err_t(* display_backend_iface::deinit) (void *ctx)

Tear down.

Mirror of init.

Definition at line 79 of file ra8_display_pal_internal.h.

◆ flush

ra8_err_t(* display_backend_iface::flush) (void *ctx, display_rect_t rect, display_refresh_hint_t hint)

Commit pending FB changes to the panel.

Definition at line 73 of file ra8_display_pal_internal.h.

◆ get_caps

ra8_err_t(* display_backend_iface::get_caps) (const void *ctx, display_caps_t *out)

Fill in *out with the backend's capabilities.

Definition at line 67 of file ra8_display_pal_internal.h.

◆ get_framebuffer

ra8_err_t(* display_backend_iface::get_framebuffer) (void *ctx, display_fb_t *out)

Hand out the framebuffer descriptor for paint loops.

Definition at line 70 of file ra8_display_pal_internal.h.

◆ init

ra8_err_t(* display_backend_iface::init) (const display_cfg_t *cfg, void **out_ctx)

Bring the backend up against cfg and return its private context pointer through *out_ctx.

The init callback runs the actual hardware bring-up (panel power, controller init, scan-out enable for LCD; SPI setup + waveform load for e-ink).

Definition at line 64 of file ra8_display_pal_internal.h.

Referenced by display_init().


The documentation for this struct was generated from the following file: