57typedef enum : uint16_t {
66typedef enum : uint16_t {
76typedef enum : uint32_t {
90typedef enum : uint16_t {
120typedef enum : uint16_t {
130typedef enum : uint16_t {
138typedef enum : uint16_t {
154typedef enum : uint16_t {
174typedef enum : uint8_t {
188typedef enum : uint8_t {
199typedef enum : int32_t {
212typedef enum : uint32_t {
222typedef enum : uint16_t {
262typedef enum : uint32_t {
280typedef enum : uint32_t {
307typedef enum : uint16_t {
318typedef enum : uint16_t {
328typedef enum : uint16_t {
338typedef enum : uint16_t {
397void er_text_left(int32_t x, int32_t y,
const char* str, uint32_t color);
415void er_text_right(int32_t right, int32_t y,
const char* str, uint32_t color);
Pure page-turn + input-region decisions for the e-reader (#78).
er_dir_t
Page-turn direction produced by an input decision.
er_spine_count_t
Number of chapters in the mock spine.
@ k_er_spine_count
Number of chapters in k_er_spine.
bool s_have_font
True once an SD font is loaded.
const char k_er_count_text[]
Book-count chip text.
void er_text_right(int32_t right, int32_t y, const char *str, uint32_t color)
Draw a right-anchored text run ending at column right.
er_color_t
PAPYR 16-level grayscale ramp, semantic roles (0xRRGGBB).
@ k_er_fill
Flat fills / covers (g13).
@ k_er_fill_deep
Heavier fill / progress (g8).
@ k_er_rule
Hairline dividers (g10).
@ k_er_paper
Page background (g15).
@ k_er_rule_soft
Faintest hairlines / track (g12).
@ k_er_ink
Primary text / glyphs (g0).
@ k_er_ink_muted
Secondary text / metadata (g5).
er_fb_dim_t
Framebuffer dimensions, sourced from the BSP panel descriptor.
@ k_er_fb_w
Framebuffer width (pixels).
@ k_er_fb_h
Framebuffer height (pixels).
void er_poll_buttons(void)
Poll SW1/SW2 and turn a page on a fresh press (#78).
bool s_reflow_open
True while the engine holds a layout.
const char k_er_search_hint[]
Search placeholder.
ra8_ui_target_t s_targets[]
Tap targets for the current screen.
reflow_t s_reflow_engine
reflow engine for the body.
ra8_kbd_layout_t s_kb
On-screen keyboard grid.
ra8_kbd_text_t s_query
Live search query.
er_reflow_cfg_t
SD-font load + reflow body-render tunables (no magic numbers).
@ k_er_img_arena
SDRAM image-decode scratch.
@ k_er_glyph_cells
Glyph-cache budget.
@ k_er_font_min
Smallest plausible font blob (bytes).
@ k_er_font_cap
Max font read off the card (bytes).
@ k_er_spi_chan
Pmod2 / J25 = SCI0 Simple-SPI.
@ k_er_reflow_ink
Body text colour (near-black ARGB).
@ k_er_glyph_cell_px
Cell edge, px (>= body).
@ k_er_glyph_cell_bytes
Bytes per cell.
@ k_er_reflow_link
Anchor colour (cerulean ARGB).
@ k_er_glyph_buckets
Glyph-cache hash buckets.
@ k_er_reflow_px
Body type size (pixels).
const char *const k_er_body_lines[]
Reading-view body paragraph lines (pre-wrapped for the font).
uint32_t s_chapter_idx
Reading chapter index.
uint16_t s_target_count
Tap targets currently populated.
uint32_t s_reflow_chapter
Chapter laid out (cache key).
bool s_nag_region_only
True when a tap only toggled the nag.
er_fg_cfg_t
MAX17048-class fuel gauge wiring (shares the touch IIC_B bus).
@ k_er_fg_reg_crate
CRATE register (sign = charge dir).
@ k_er_fg_addr
Fuel gauge 7-bit I2C address.
@ k_er_fg_sign
CRATE high-byte sign bit (discharge).
@ k_er_fg_reg_soc
SOC register (high byte = percent).
volatile uint32_t g_er_turns
Count of page turns applied since boot.
const char *const k_er_nav_items[]
Bottom-nav destinations (Library / Store / Notes / Settings).
er_hit_cap_t
Tap-target table capacity and Reading back-affordance size.
@ k_er_back_w
Reading back-region width (px).
@ k_er_page_back_cap
Footnote-jump back-stack depth.
@ k_er_max_targets
Max collected tap targets.
const char k_er_page_label[]
Reading page label.
er_layout_t
Shared chrome layout metrics (8 px grid), pixels.
@ k_er_pad_ui
Side padding for bands / grid.
@ k_er_count_w
Toolbar "N books" chip width.
@ k_er_card_label_h
Card title / author row height.
@ k_er_text_inset_y
16 px text centred in a 64 px band.
@ k_er_border_w
Card / control border weight.
@ k_er_text_pad
Inset for text inside a box.
@ k_er_glyph_w
Bundled font cell width.
@ k_er_footer_h
Reading footer band height.
@ k_er_toolbar_h
Library toolbar band height.
@ k_er_card_bar_h
Card progress-bar height.
@ k_er_progress_gap
Gap above the reading progress bar.
@ k_er_nav_h
Library bottom-nav band height.
@ k_er_progress_h
Reading-progress bar height.
@ k_er_line_h
Body line advance.
@ k_er_statusbar_h
Top status-bar band height.
@ k_er_grid_gap
Library grid gap.
@ k_er_tile_gap
Gap between a card's stacked parts.
@ k_er_blank_lines
Blank advance after the heading.
@ k_er_grid_cols
Library grid column count.
@ k_er_margin_x
Reading left/right margin.
@ k_er_body_gap
Gap between band and body text.
@ k_er_hair
Hairline weight.
@ k_er_glyph_h
Bundled font cell height.
er_touch_cfg_t
GT911 touch-controller wiring on the EK-RA8D2 carrier.
@ k_er_touch_channel
The board's GT911 bus.
@ k_er_touch_max_points
One contact = one tap.
display_turn_event_t s_pending_event
Pending refresh event for next flush.
void er_render_reading(void)
Render the full Reading screen (status bar, body, footer).
int32_t s_reflow_w
Body width the layout used.
const char k_er_book_title[]
Reading title text.
uint8_t s_img_arena_buf[]
Image-decode bump arena in SDRAM.
er_progress_t
Reading-position + percentage constants.
@ k_er_page_total
Reading total pages.
@ k_er_pct_full
Percent denominator.
@ k_er_page_current
Reading current page (1-based).
void er_flush_event(display_turn_event_t event)
Flush the panel for a refresh event through the cadence policy (#78).
er_nav_count_t
Bottom-nav destination count.
@ k_er_nav_count
Number of bottom-nav destinations.
@ k_er_nav_idx_setting
Index of the "Settings" nav item.
void er_nag_render(ra8_widget_t *w)
Nag banner overlay widget: a centered low-battery toast over the screen.
ra8_batt_monitor_t s_batt_mon
Low-battery nag policy state.
volatile uint32_t g_er_last_hint
Last display_refresh_hint_t flushed.
er_nag_cfg_t
Low-battery nag-banner geometry.
@ k_er_nag_margin
Banner inset from the screen sides.
@ k_er_nag_h
Banner height (px).
@ k_er_nag_top
Banner top y (clear of the status bar).
@ k_er_nag_dec_max
Scratch for a "NNN%" decimal tail.
@ k_er_nag_text_dy
Text inset from the banner top.
@ k_er_nag_line_max
Banner text buffer size (bounds copy).
@ k_er_nag_text_dx
Text inset from the banner left.
@ k_er_nag_dec_ten
Decimal base.
@ k_er_batt_every
Poll the gauge every Nth frame (~1/s).
const char k_er_status_right[]
Status-bar right text.
int32_t s_reflow_h
Body height the layout used.
uint32_t s_loc_back_count
Entries used in s_loc_back.
er_loc_t s_loc_back[]
Reading back-stack for link jumps.
uint32_t s_reading_pages
Reading total reflow pages (>= 1).
const char k_er_chapter[]
Bitmap-fallback heading.
uint32_t er_spine_count(void)
Number of chapters in the (mock) spine.
ra8_batt_nag_t s_batt_nag
Nag currently shown over the chrome.
const char k_er_wordmark[6]
Wordmark / status text.
uint32_t s_reading_page
Reading current reflow page.
const er_chapter_t k_er_spine[]
Two-chapter mock spine for in-content cross-chapter navigation (#110).
const er_book_t k_er_books[]
Demo shelf (public-domain works).
er_node_cap_t
Box-tree node-storage capacity.
@ k_er_max_nodes
Upper bound on chrome box nodes.
void er_render_current(void)
Render whichever screen is on top of the navigation stack.
void er_push_loc(void)
Push the current (chapter, page) on the back-stack, capacity permitting.
void er_poll_battery(void)
Poll the fuel gauge, fold it into the nag policy, and toggle the banner.
er_action_t
Tap-target action ids (carried on box nodes as their tag).
@ k_er_act_none
Not a tap target.
@ k_er_act_open_book
Library card -> open the reading view.
@ k_er_act_settings
Bottom-nav Settings -> Settings app.
@ k_er_act_search
Toolbar Search -> open the keyboard.
@ k_er_act_nav
Bottom-nav destination (stay in lib).
@ k_er_act_key_base
Keyboard key i -> base + i.
const char k_er_lib_heading[]
Library heading text.
void er_text_left(int32_t x, int32_t y, const char *str, uint32_t color)
Draw a left-anchored text run in the bundled font.
er_book_count_t
Number of demo books.
@ k_er_book_count
Number of demo books.
er_reflow_sentinel_t
"No chapter cached" sentinel.
@ k_er_chapter_none
s_reflow_chapter when nothing is laid out.
bool er_reading_link_tap(int32_t x, int32_t y)
Follow an in-content <a> tap in the Reading body (#110).
er_body_count_t
Number of pre-wrapped body lines.
@ k_er_body_line_count
Number of pre-wrapped body lines.
void er_render_keyboard(void)
Render the on-screen keyboard screen + collect its key targets.
er_screen_t
Screen ids for the ra8_ui navigation stack.
@ k_er_screen_reading
Reading view.
@ k_er_screen_keyboard
On-screen keyboard (search entry).
@ k_er_screen_library
Library / home grid.
@ k_er_screen_settings
Settings (optional app, if RA8_APP_SETTINGS).
bool er_apply_pageturn(er_dir_t dir)
Apply a page turn to the reading location (touch + button shared path).
uint8_t s_batt_soc
Last fuel-gauge SOC percent.
uint32_t s_font_len
Bytes of font read off the card.
void er_render_nag_region(void)
Repaint only the low-battery banner rect (dirty-region update).
void er_poll_touch(void)
Poll the touch controller and dispatch a tap on a fresh press.
er_fb_misc_t
Framebuffer byte-math and pacing constants.
@ k_er_settle_ms
PLL / SDRAM / panel-POR settle.
@ k_er_frame_ms
Input poll period (ms): touch / button cadence.
@ k_er_led_every
Toggle the heartbeat LED every Nth frame.
volatile uint32_t g_er_cur_page
SWD / --dump-sym telemetry for the headless page-turn HIL (#78).
er_nag_color_t
Nag-banner palette (grayscale e-ink).
@ k_er_nag_low_bg
Low-battery banner fill (g5).
@ k_er_nag_text
Banner text (paper on the fill).
@ k_er_nag_crit_bg
Critical banner fill (g0 ink).
void er_render_library(void)
Render the full Library screen.
static uint8_t s_font_buf[k_pc_font_cap]
Font blob read off the card.
static ra8_app_nav_t s_nav
Navigation back-stack layered over s_reg.
Zero-heap app framework: lifecycle + static registry + launcher (#146).
Bounded, allocation-free low-battery nag policy.
ra8_batt_nag_t
The low-battery warning a single ra8_batt_update step raises.
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
@ k_ra8_board_touch_i3c_channel
IIC_B / I3C channel 0 carries the GT911.
Bounded, allocation-free box-model layout for e-reader chrome.
Display Platform Abstraction Layer for the RA8D2.
Pluggable page-turn refresh-cadence policy for bistable (e-ink) panels.
display_turn_event_t
The page-transition event the policy reacts to.
On-screen keyboard widget – iOS-style layers, shift, hit-test.
Active display-panel descriptor for the EK-RA8D2 (ER-TFT070-6).
@ k_panel_height_px
Native height (pixels).
@ k_panel_width_px
Native width (pixels).
EK-RA8D2 panel timing as the HAL's ra8_glcdc_timing_t (ER-TFT070-6).
Typed Port / Pin Constants for the RA8D2 IOPORT Module.
Bounded UI interaction core: hit-testing, screen stack, paging.
HTML / CSS reflow + paginate engine for the ra8d2 ereader.
Framebuffer descriptor returned by display_get_framebuffer.
One library entry: title, author, reading progress percent.
const char * title
Book title.
const char * author
Author.
uint16_t pct
Reading progress (0..100).
One mock-spine chapter: its XHTML, length, and resolving href.
uint32_t len
Length of xhtml (excl.
const char * xhtml
Chapter XHTML body.
const char * href
Manifest href that links to it.
uint32_t href_len
Length of href (excl.
A reading location (chapter + page) for the navigation back-stack.
uint32_t chapter
Spine chapter index.
uint32_t page
Page within chapter.
Caller-owned nag state carried across ra8_batt_update calls.
The key grid for the active layer, plus SHIFT / layer / frame state.
The typed query buffer + commit state.
Fixed-depth screen-id stack (caller-owned).
One tap target: a rectangle bound to an opaque action id.
Reflow / pagination engine state.