125 p->
kind = (uint8_t)kind;
170 if ((w == 0U) || (h == 0U)) {
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Validation and Error-Checking Macros for ra8-firmware.
#define RA8_CHECK_NULL_PTR(ptr, tag, message)
Reject nullptr pointer, returning k_ra8_err_null_ptr.
@ k_display_refresh_fast
Prioritise latency.
@ k_display_refresh_init
Full reset of the panel.
@ k_display_refresh_quality
Prioritise final quality.
ra8_err_t display_policy_init(display_policy_t *p, display_policy_kind_t kind, uint16_t clean_every)
Initialise a refresh-cadence policy.
static void internal_decide_fast_clean(display_policy_t *p, display_turn_event_t event, display_policy_decision_t *out)
Resolve the k_display_policy_fast_clean decision for a non-open turn.
ra8_err_t display_policy_full_rect(uint16_t w, uint16_t h, display_rect_t *out)
Build the full-page damage rectangle for a page turn.
static uint16_t internal_clamp_clean_every(uint16_t n)
Clamp a requested clean cadence to the documented bounds.
static const char *const s_tag_policy
Log tag for the refresh-cadence policy module.
ra8_err_t display_policy_decide(display_policy_t *p, display_turn_event_t event, display_policy_decision_t *out)
Decide the flush parameters for one page-transition event.
Pluggable page-turn refresh-cadence policy for bistable (e-ink) panels.
display_policy_kind_t
Selectable refresh-cadence strategies (chosen at display_policy_init).
@ k_display_policy_quality
Always clean GC16 full – no ghosting, slow.
@ k_display_policy_fast_clean
A2 partial, periodic GC16 clean (default).
@ k_display_policy_fast_only
Always fast A2 partial – snappiest, ghosts.
display_turn_event_t
The page-transition event the policy reacts to.
@ k_display_event_chapter
Chapter-boundary turn – wants a clean refresh.
@ k_display_event_open
Book/first page opened – wants a clean INIT.
@ k_display_policy_clean_every_max
Clamp ceiling.
@ k_display_policy_clean_every_min
Clamp floor (every turn is clean).
Error Code Definitions for ra8-firmware.
@ k_ra8_err_invalid_arg
Invalid function argument.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
#define ra8_log_error(tag, message)
RA8 log error.
What the app should pass to display_flush for this event.
display_refresh_hint_t hint
Waveform intent (fast/quality/init).
bool full_update
true => flush the whole page rect.
Caller-owned policy state (zero heap; init once, decide per turn).
uint8_t kind
Active display_policy_kind_t.
uint16_t turns_since_clean
Fast turns since the last clean refresh.
uint16_t clean_every
Fast turns between GC16 cleans (fast_clean).
Rectangle in framebuffer coordinates passed into display_flush.
uint16_t h
Height in pixels.
uint16_t w
Width in pixels.
uint16_t y
Top edge in pixels.
uint16_t x
Left edge in pixels.