159typedef enum : uint16_t {
169typedef enum : uint8_t {
183typedef enum : uint8_t {
233typedef enum : uint32_t {
248typedef enum : uint8_t {
bool ra8_epd_cal_vcom_in_range(uint16_t mv, const ra8_epd_cal_limits_mv_t *limits)
Range-check a candidate VCOM against a panel's documented window.
ra8_epd_cal_limits_t
Sizing and schema constants for the calibration record.
@ k_ra8_epd_cal_blob_size
Serialised record size in bytes.
@ k_ra8_epd_cal_schema_version
Current on-flash schema version.
@ k_ra8_epd_cal_payload_len
Schema-1 payload bytes (vcom_mv).
ra8_err_t(* ra8_epd_cal_nv_write_fn_t)(void *ctx, const uint8_t *src, size_t len)
Durably store the serialised record (DI seam).
ra8_err_t ra8_epd_cal_provision(const ra8_epd_cal_cfg_t *cfg, uint16_t vcom_mv)
Write a per-device calibration record to non-volatile storage.
ra8_epd_cal_source_t
Which authority supplied the resolved VCOM.
@ k_ra8_epd_cal_src_panel
Read back from the controller.
@ k_ra8_epd_cal_src_record
From the per-device NV record.
@ k_ra8_epd_cal_src_provisioned
Operator-supplied this boot.
@ k_ra8_epd_cal_src_bench
RA8_BENCH_VCOM_MV; see below.
@ k_ra8_epd_cal_src_none
No trusted value – do NOT drive.
ra8_err_t(* ra8_epd_cal_nv_read_fn_t)(void *ctx, uint8_t *dst, size_t len)
Read the serialised record out of non-volatile storage (DI seam).
ra8_epd_cal_magic_t
Bytes of the record magic 'EVCM' (E-paper VCOM).
@ k_ra8_epd_cal_magic_b0
'E'
@ k_ra8_epd_cal_magic_b2
'C'
@ k_ra8_epd_cal_magic_b3
'M'
@ k_ra8_epd_cal_magic_b1
'V'
ra8_err_t ra8_epd_cal_resolve(const ra8_epd_cal_cfg_t *cfg, ra8_epd_cal_result_t *out_result)
Resolve the VCOM to drive this panel at, or fail safe.
ra8_err_t ra8_epd_cal_deserialize(const uint8_t *src, size_t src_size, ra8_epd_cal_record_t *out_rec)
Parse and integrity-check a serialised record.
ra8_err_t(* ra8_epd_cal_panel_get_fn_t)(void *ctx, uint16_t *out_mv)
Read the controller's current VCOM, in millivolts (DI seam).
ra8_err_t ra8_epd_cal_serialize(const ra8_epd_cal_record_t *rec, uint8_t *dst, size_t dst_size)
Serialise a record into its 32-byte on-flash form.
ra8_epd_cal_storage_t
Placement of the record in non-volatile storage.
@ k_ra8_epd_cal_extra_mram_offset
Byte offset into extra-MRAM.
ra8_err_t ra8_epd_cal_apply(const ra8_epd_cal_cfg_t *cfg, const ra8_epd_cal_result_t *result)
Programme a resolved VCOM onto the controller and confirm it took.
ra8_err_t(* ra8_epd_cal_panel_set_fn_t)(void *ctx, uint16_t mv)
Programme the controller's VCOM, in millivolts (DI seam).
ra8_epd_cal_layout_t
Byte offsets inside the serialised record.
@ k_ra8_epd_cal_off_crc32
CRC-32 trailer, LE32.
@ k_ra8_epd_cal_off_payload_len
Payload length, LE16.
@ k_ra8_epd_cal_off_magic
'EVCM' magic.
@ k_ra8_epd_cal_off_reserved0
One reserved zero byte.
@ k_ra8_epd_cal_off_version
Schema version byte.
@ k_ra8_epd_cal_off_vcom_mv
VCOM magnitude, LE16.
@ k_ra8_epd_cal_off_reserved1
Reserved growth span.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Everything ra8_epd_cal_resolve needs.
ra8_epd_cal_store_t store
Per-device record store seam.
bool has_provisioned
Whether the field above is set.
uint16_t provisioned_mv
Operator value for this boot.
ra8_epd_cal_panel_ops_t panel
Controller access seam.
ra8_epd_cal_limits_mv_t limits
Panel's documented VCOM window.
The panel's documented VCOM window, in millivolt magnitudes.
uint16_t min_mv
Lowest accepted VCOM magnitude, millivolts.
uint16_t max_mv
Highest accepted VCOM magnitude, millivolts.
Injected controller access for VCOM.
ra8_epd_cal_panel_get_fn_t get
VCOM read seam; may be NULL.
void * ctx
Opaque context for both.
ra8_epd_cal_panel_set_fn_t set
VCOM write seam; may be NULL.
Decoded per-device calibration record.
uint8_t schema_version
Schema the record was written under.
uint16_t vcom_mv
VCOM magnitude in millivolts (e.g.
Outcome of ra8_epd_cal_resolve.
ra8_epd_cal_source_t source
Which authority supplied it.
uint16_t vcom_mv
Resolved VCOM magnitude, millivolts.
Injected non-volatile store for the calibration record.
ra8_epd_cal_nv_read_fn_t read
Record read seam; may be NULL.
void * ctx
Opaque context for both.