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

Dependency-injection vtable for the record backing store. More...

#include <ra8_devcfg.h>

Data Fields

ra8_devcfg_read_fn_t read
 Backing read; non-NULL.
ra8_devcfg_write_fn_t write
 Backing write; non-NULL.

Detailed Description

Dependency-injection vtable for the record backing store.

The single seam between the hardware-agnostic record logic and the durable medium (NASA Power-of-10 Rule 9 deviation: function pointers enable Dependency Inversion and host mock injection). Production binds ra8_devcfg_default_store (extra-MRAM); host tests bind a RAM mock. Both members must be non-NULL for ra8_devcfg_load / ra8_devcfg_commit to proceed. This mirrors the ra8_epd_cal_store_t and ra8_rot_antirollback_store_t seams; callers reach the backing only through this vtable, never by naming a backend symbol.

Invariant
read and write are either both bound to a real backing or both bound to a mock (never one of each).
Example:
if (ra8_devcfg_load(store) == k_ra8_ok) {
uint16_t mv = 0U;
if (ra8_devcfg_get_vcom_mv(&mv) == k_ra8_ok) { drive_panel(mv); }
}
ra8_err_t ra8_devcfg_load(const ra8_devcfg_store_t *store)
Load and resolve the device configuration record from both copies.
Definition ra8_devcfg.c:549
ra8_err_t ra8_devcfg_get_vcom_mv(uint16_t *out_mv)
Fetch the validated panel VCOM magnitude in millivolts.
Definition ra8_devcfg.c:575
const ra8_devcfg_store_t * ra8_devcfg_default_store(void)
Return the production extra-MRAM-backed store binding.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
Definition ra8_err.h:119
Dependency-injection vtable for the record backing store.
Definition ra8_devcfg.h:320
See also
ra8_devcfg_load
ra8_devcfg_default_store

Definition at line 320 of file ra8_devcfg.h.

Field Documentation

◆ read

ra8_devcfg_read_fn_t ra8_devcfg_store_t::read

Backing read; non-NULL.

Definition at line 321 of file ra8_devcfg.h.

Referenced by internal_devcfg_probe(), ra8_devcfg_commit(), and ra8_devcfg_load().

◆ write

ra8_devcfg_write_fn_t ra8_devcfg_store_t::write

Backing write; non-NULL.

Definition at line 322 of file ra8_devcfg.h.

Referenced by internal_devcfg_write_record(), and ra8_devcfg_commit().


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