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

E-reader UI chrome – on-screen keyboard, battery nag, input polling. More...

#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include "er_pageturn.h"
#include "ereader_ui_steps.h"
#include "ra8_board_ek_ra8d2.h"
#include "ra8_display_pal.h"
#include "ra8_err.h"
#include "ra8_gfx.h"
#include "ra8_gfx_font.h"
#include "ra8_i3c.h"
#include "ra8_keyboard.h"
#include "ra8_port_constants.h"
#include "ra8_port_utils.h"
#include "ra8_touch.h"
#include "ra8_ui.h"
#include "ra8_widget.h"
Include dependency graph for ereader_ui_input.c:

Go to the source code of this file.

Enumerations

enum  er_kbd_render_t : int32_t {
  k_er_kbd_glyph_w = 8 ,
  k_er_kbd_glyph_h = 16 ,
  k_er_kbd_qlabel = 72 ,
  k_er_kbd_gap = 6 ,
  k_er_kbd_radius = 10 ,
  k_er_kbd_shadow_dy = 3 ,
  k_er_kbd_lab_max = 8 ,
  k_er_ico_aw = 11 ,
  k_er_ico_atop = 12 ,
  k_er_ico_abot = 2 ,
  k_er_ico_sw = 3 ,
  k_er_ico_sbot = 11 ,
  k_er_ico_dw = 14 ,
  k_er_ico_dh = 9 ,
  k_er_ico_dx = 5 ,
  k_er_ico_dxo = 4 ,
  k_er_ico_rw = 11 ,
  k_er_ico_rh = 10 ,
  k_er_ico_rah = 6
}
 Keyboard chrome metrics (8x16 glyphs + keys). More...
enum  er_kbd_color_t : uint32_t {
  k_er_kbd_bg = 0xCCCCCCU ,
  k_er_kbd_keylt = 0xFFFFFFU ,
  k_er_kbd_keydk = 0xAAAAAAU ,
  k_er_kbd_keysh = 0x909090U
}
 Apple-style grayscale keyboard palette. More...

Functions

static const char * er_kbd_label (uint8_t idx, char *s)
 Text label for key idx (SPACE / 123-ABC, or live-case char in s).
static void er_round_rect (int32_t x, int32_t y, int32_t w, int32_t h, uint32_t c)
 Filled rounded rect (rect cross + four corner discs).
static void er_tri_up (int32_t cx, int32_t ay, int32_t by, int32_t hw, uint32_t c)
 Filled upward triangle from apex row ay to base row by (scanlines).
static void er_icon_shift (int32_t cx, int32_t cy, uint32_t c)
 SHIFT glyph: an up-arrow (filled arrowhead over a narrow stem).
static void er_icon_delete (int32_t cx, int32_t cy, uint32_t c)
 BACKSPACE glyph: a left-pointing pentagon outline with an X inside.
static void er_icon_return (int32_t cx, int32_t cy, uint32_t c)
 RETURN glyph: a carriage-return arrow (tail down, shaft left, arrowhead).
static bool er_key_is_special (ra8_kbd_key_kind_t kind)
 True for keys drawn dark (SHIFT / BACKSPACE / 123-ABC / RETURN).
static void er_draw_key_label (uint8_t idx, int32_t kx, int32_t ky, int32_t kw, int32_t kh, uint32_t fill)
 Draw the text label of key idx centred in the key body.
static void er_draw_key (uint8_t idx)
 Draw key idx Apple-style: a shadowed rounded key + glyph icon / label.
static void er_kbd_search_render (ra8_widget_t *w)
 Search-field band widget: the "Search:" label + the query / hint.
static void er_kbd_keys_render (ra8_widget_t *w)
 Keyboard band widget: gray backdrop + the laid-out keys + tap targets.
void er_render_keyboard (void)
 Render the on-screen keyboard screen + collect its key targets.
static bool er_fg_read (uint8_t reg, uint8_t *out)
 Best-effort read of one fuel-gauge register on the touch IIC_B bus.
static bool er_read_battery (uint8_t *soc, bool *charging)
 Read SOC + charge direction from the fuel gauge; false if absent (NAK).
static void er_append_pct (char *buf, uint32_t cap, uint32_t *pos, uint8_t v)
 Append "<v>%" (v in 0..255) to buf at *pos, bounded + NUL-terminated.
static void er_append_str (char *buf, uint32_t cap, uint32_t *pos, const char *s)
 Append NUL-terminated s to buf at *pos, bounded + NUL-terminated.
static bool er_nag_hit (int32_t x, int32_t y)
 True iff (x,y) lands on the low-battery banner rect.
void er_nag_render (ra8_widget_t *w)
 Nag banner overlay widget: a centered low-battery toast over the screen.
static bool er_handle_reading_tap (int32_t x, int32_t y)
 Handle a tap while the Reading view is on top.
static bool er_handle_keyboard_tap (int32_t x, int32_t y)
 Route a tap on the keyboard screen: type a key, or commit on ENTER.
static bool er_handle_tap (int32_t x, int32_t y)
 Route a tap to a navigation action for the current screen.
void er_poll_touch (void)
 Poll the touch controller and dispatch a tap on a fresh press.
static bool er_sw_pressed (ra8_port_pin_t pin)
 Read a user switch (active-low); true == pressed.
void er_poll_buttons (void)
 Poll SW1/SW2 and turn a page on a fresh press (#78).
void er_poll_battery (void)
 Implementation of er_poll_battery() – the clear-the-banner glue.

Variables

static const ra8_widget_vtable_t k_er_kbd_search_vt = {.render = er_kbd_search_render}
 Vtables for the keyboard search-field / keys band widgets.
static const ra8_widget_vtable_t k_er_kbd_keys_vt = {.render = er_kbd_keys_render}
static const char k_er_nag_low_msg [] = "Low battery "
 Nag banner messages (the SOC percent + dismiss hint follow at render).
static const char k_er_nag_crit_msg [] = "Battery critical "
static const char k_er_nag_hint [] = " (tap to dismiss)"
 Trailing hint so the banner says how to close itself.
static bool s_was_touching
 Debounce: true while a contact is held, to fire once per tap.
static bool s_was_sw1
 Debounce: true while SW1/SW2 are held, to fire once per press.
static bool s_was_sw2

Detailed Description

E-reader UI chrome – on-screen keyboard, battery nag, input polling.

Tag
[Ring 6 / APP] {World: S}

Split out of ereader_ui/main.c to keep every translation unit under the repository's 1000-line cap (a pure code move). This unit owns the Apple-style on-screen keyboard rendering (rounded keys, vector SHIFT / BACKSPACE / RETURN glyph icons, search-field band), the optional Settings stub, the low-battery nag-banner overlay and its fuel-gauge polling, and the per-frame input dispatch (touch taps and SW1/SW2 page-turn buttons). The composited chrome is byte-identical to the pre-split monolith.

Since
0.1.0

Definition in file ereader_ui_input.c.

Enumeration Type Documentation

◆ er_kbd_color_t

enum er_kbd_color_t : uint32_t

Apple-style grayscale keyboard palette.

Enumerator
k_er_kbd_bg 

Keyboard background.

k_er_kbd_keylt 

Light (letter/space) key.

k_er_kbd_keydk 

Dark (special) key.

k_er_kbd_keysh 

Key drop shadow.

Definition at line 70 of file ereader_ui_input.c.

◆ er_kbd_render_t

enum er_kbd_render_t : int32_t

Keyboard chrome metrics (8x16 glyphs + keys).

Enumerator
k_er_kbd_glyph_w 

ra8_gfx_font_8x16 glyph width.

k_er_kbd_glyph_h 

ra8_gfx_font_8x16 glyph height.

k_er_kbd_qlabel 

"Search:" label column width.

k_er_kbd_gap 

Inset gap around each key.

k_er_kbd_radius 

Key corner radius (rounded, iOS).

k_er_kbd_shadow_dy 

Key drop-shadow offset (down).

k_er_kbd_lab_max 

Key-label scratch size.

k_er_ico_aw 

Shift arrowhead half-width.

k_er_ico_atop 

Shift arrowhead apex, above centre.

k_er_ico_abot 

Shift arrowhead base, above centre.

k_er_ico_sw 

Shift stem half-width.

k_er_ico_sbot 

Shift stem, below centre.

k_er_ico_dw 

Delete glyph half-width.

k_er_ico_dh 

Delete glyph half-height.

k_er_ico_dx 

Delete X half-extent.

k_er_ico_dxo 

Delete X right-of-centre offset.

k_er_ico_rw 

Return shaft half-width.

k_er_ico_rh 

Return tail height.

k_er_ico_rah 

Return arrowhead leg.

Definition at line 46 of file ereader_ui_input.c.

Function Documentation

◆ er_append_pct()

void er_append_pct ( char * buf,
uint32_t cap,
uint32_t * pos,
uint8_t v )
static

Append "<v>%" (v in 0..255) to buf at *pos, bounded + NUL-terminated.

Definition at line 330 of file ereader_ui_input.c.

References k_er_nag_dec_max, and k_er_nag_dec_ten.

Referenced by er_nag_render().

◆ er_append_str()

void er_append_str ( char * buf,
uint32_t cap,
uint32_t * pos,
const char * s )
static

Append NUL-terminated s to buf at *pos, bounded + NUL-terminated.

Definition at line 355 of file ereader_ui_input.c.

References k_er_nag_line_max.

Referenced by er_nag_render().

◆ er_draw_key()

void er_draw_key ( uint8_t idx)
static

Draw key idx Apple-style: a shadowed rounded key + glyph icon / label.

SHIFT / BACKSPACE / RETURN render as vector glyph icons; every other key (letters, digits, symbols, SPACE, 123/#+=/ABC) renders its text label. An armed one-shot SHIFT inverts the SHIFT key (white body) like iOS.

Definition at line 188 of file ereader_ui_input.c.

References er_draw_key_label(), er_icon_delete(), er_icon_return(), er_icon_shift(), er_key_is_special(), er_round_rect(), ra8_ui_rect_t::h, k_er_ink, k_er_kbd_gap, k_er_kbd_keydk, k_er_kbd_keylt, k_er_kbd_keysh, k_er_kbd_shadow_dy, k_ra8_kbd_key_backspace, k_ra8_kbd_key_enter, k_ra8_kbd_key_shift, s_kb, ra8_ui_rect_t::w, ra8_ui_rect_t::x, and ra8_ui_rect_t::y.

Referenced by er_kbd_keys_render().

◆ er_draw_key_label()

void er_draw_key_label ( uint8_t idx,
int32_t kx,
int32_t ky,
int32_t kw,
int32_t kh,
uint32_t fill )
static

Draw the text label of key idx centred in the key body.

Definition at line 172 of file ereader_ui_input.c.

References er_kbd_label(), k_er_ink, k_er_kbd_glyph_h, k_er_kbd_glyph_w, k_er_kbd_lab_max, ra8_gfx_font_8x16, ra8_gfx_text_out(), and strlen().

Referenced by er_draw_key().

◆ er_fg_read()

bool er_fg_read ( uint8_t reg,
uint8_t * out )
static

Best-effort read of one fuel-gauge register on the touch IIC_B bus.

Definition at line 297 of file ereader_ui_input.c.

References k_er_fg_addr, k_er_touch_channel, k_ra8_ok, ra8_i3c_read(), and ra8_i3c_write().

Referenced by er_read_battery().

◆ er_handle_keyboard_tap()

bool er_handle_keyboard_tap ( int32_t x,
int32_t y )
static

Route a tap on the keyboard screen: type a key, or commit on ENTER.

Parameters
[in]xTap X (panel pixels).
[in]yTap Y (panel pixels).
Returns
true if the screen must re-render (a key changed the query, or the committed query popped back to the filtered Library).

Definition at line 460 of file ereader_ui_input.c.

References k_er_act_key_base, k_er_act_none, k_er_screen_library, k_ra8_ok, ra8_kbd_apply(), ra8_ui_hit_test(), ra8_ui_nav_pop(), s_kb, s_nav, s_query, s_target_count, and s_targets.

Referenced by er_handle_tap().

◆ er_handle_reading_tap()

bool er_handle_reading_tap ( int32_t x,
int32_t y )
static

Handle a tap while the Reading view is on top.

In priority order: the back-region (return from a link jump, else pop to the Library), an in-content <a> link (er_reading_link_tap), then a left/right page-turn. Split out of er_handle_tap() to keep each within the cognitive-complexity budget.

Parameters
[in]xTap X (panel pixels).
[in]yTap Y (panel pixels).
Returns
true iff the tap changed the reading location / screen.
Return values
trueRe-render required.
falseTap hit nothing actionable.
Precondition
The Reading view is on top of s_nav.
ra8_gfx is bound and the chapter is laid out.
Postcondition
The navigation / page state may change.
Note
Not thread-safe.
Since
0.1.0

Definition at line 426 of file ereader_ui_input.c.

References er_apply_pageturn(), er_reading_link_tap(), er_tap_to_dir(), k_er_back_w, k_er_statusbar_h, k_ra8_ok, ra8_ui_nav_pop(), ra8_ui_rect_contains(), s_chapter_idx, s_fb, s_loc_back, s_loc_back_count, s_nav, and s_reading_page.

Referenced by er_handle_tap().

◆ er_handle_tap()

bool er_handle_tap ( int32_t x,
int32_t y )
static

Route a tap to a navigation action for the current screen.

Parameters
[in]xTap X (panel pixels).
[in]yTap Y (panel pixels).
Returns
true if the tap changed the screen (caller should re-render).
Return values
trueNavigation stack changed.
falseTap hit nothing actionable.
Precondition
ra8_gfx is bound; s_nav initialised; targets reflect the screen.
None.
Postcondition
On a Library card tap the Reading view is pushed; on a Reading back-region tap it is popped.
On no hit the stack is unchanged.
Note
Not thread-safe.
Since
0.1.0

Definition at line 496 of file ereader_ui_input.c.

References er_handle_keyboard_tap(), er_handle_reading_tap(), er_nag_hit(), k_display_event_chapter, k_display_event_open, k_er_act_none, k_er_act_open_book, k_er_act_search, k_er_act_settings, k_er_screen_keyboard, k_er_screen_library, k_er_screen_reading, k_er_screen_settings, k_ra8_batt_nag_none, k_ra8_ok, ra8_kbd_text_init(), ra8_ui_hit_test(), ra8_ui_nav_pop(), ra8_ui_nav_push(), ra8_ui_nav_top(), s_batt_nag, s_chapter_idx, s_loc_back_count, s_nag_region_only, s_nav, s_pending_event, s_query, s_reading_page, s_target_count, and s_targets.

Referenced by er_poll_touch().

◆ er_icon_delete()

void er_icon_delete ( int32_t cx,
int32_t cy,
uint32_t c )
static

BACKSPACE glyph: a left-pointing pentagon outline with an X inside.

Definition at line 137 of file ereader_ui_input.c.

References k_er_ico_dh, k_er_ico_dw, k_er_ico_dx, k_er_ico_dxo, and ra8_gfx_line().

Referenced by er_draw_key().

◆ er_icon_return()

void er_icon_return ( int32_t cx,
int32_t cy,
uint32_t c )
static

RETURN glyph: a carriage-return arrow (tail down, shaft left, arrowhead).

Definition at line 154 of file ereader_ui_input.c.

References k_er_ico_rah, k_er_ico_rh, k_er_ico_rw, and ra8_gfx_line().

Referenced by er_draw_key().

◆ er_icon_shift()

void er_icon_shift ( int32_t cx,
int32_t cy,
uint32_t c )
static

SHIFT glyph: an up-arrow (filled arrowhead over a narrow stem).

Definition at line 125 of file ereader_ui_input.c.

References er_tri_up(), k_er_ico_abot, k_er_ico_atop, k_er_ico_aw, k_er_ico_sbot, k_er_ico_sw, and ra8_gfx_rect().

Referenced by er_draw_key().

◆ er_kbd_keys_render()

void er_kbd_keys_render ( ra8_widget_t * w)
static

Keyboard band widget: gray backdrop + the laid-out keys + tap targets.

Definition at line 232 of file ereader_ui_input.c.

References er_draw_key(), k_er_act_key_base, k_er_kbd_bg, k_er_max_targets, k_er_pad_ui, k_er_statusbar_h, k_er_toolbar_h, ra8_gfx_rect(), ra8_kbd_layout_init(), s_fb, s_kb, s_target_count, and s_targets.

◆ er_kbd_label()

const char * er_kbd_label ( uint8_t idx,
char * s )
static

Text label for key idx (SPACE / 123-ABC, or live-case char in s).

Note
SHIFT / BACKSPACE / RETURN are drawn as glyph icons, not text, so they never reach this helper.

Definition at line 82 of file ereader_ui_input.c.

References k_ra8_kbd_key_layer, k_ra8_kbd_key_space, k_ra8_kbd_layer_numbers, k_ra8_kbd_layer_symbols, ra8_kbd_key_glyph(), and s_kb.

Referenced by er_draw_key_label().

◆ er_kbd_search_render()

void er_kbd_search_render ( ra8_widget_t * w)
static

Search-field band widget: the "Search:" label + the query / hint.

Definition at line 222 of file ereader_ui_input.c.

References er_text_left(), k_er_ink, k_er_ink_muted, k_er_kbd_qlabel, k_er_pad_ui, k_er_search_hint, k_er_statusbar_h, k_er_text_pad, and s_query.

◆ er_key_is_special()

bool er_key_is_special ( ra8_kbd_key_kind_t kind)
static

True for keys drawn dark (SHIFT / BACKSPACE / 123-ABC / RETURN).

Definition at line 165 of file ereader_ui_input.c.

References k_ra8_kbd_key_char, and k_ra8_kbd_key_space.

Referenced by er_draw_key().

◆ er_nag_hit()

bool er_nag_hit ( int32_t x,
int32_t y )
static

True iff (x,y) lands on the low-battery banner rect.

Definition at line 367 of file ereader_ui_input.c.

References k_er_nag_h, k_er_nag_margin, k_er_nag_top, and s_fb.

Referenced by er_handle_tap().

◆ er_nag_render()

void er_nag_render ( ra8_widget_t * w)

Nag banner overlay widget: a centered low-battery toast over the screen.

Parameters
[in,out]wWidget instance (unused; the banner reads file-scope state).
Precondition
ra8_gfx is bound; s_fb reflects the framebuffer geometry.
None.
Postcondition
On an active nag the banner rect + text is drawn; else nothing.
No navigation state mutated.
Note
Not thread-safe.
Since
0.1.0

Definition at line 375 of file ereader_ui_input.c.

References er_append_pct(), er_append_str(), k_er_ink, k_er_nag_crit_bg, k_er_nag_crit_msg, k_er_nag_h, k_er_nag_hint, k_er_nag_line_max, k_er_nag_low_bg, k_er_nag_low_msg, k_er_nag_margin, k_er_nag_text, k_er_nag_text_dx, k_er_nag_text_dy, k_er_nag_top, k_ra8_batt_nag_critical, k_ra8_batt_nag_none, ra8_gfx_font_8x16, ra8_gfx_rect(), ra8_gfx_text_out(), s_batt_nag, s_batt_soc, and s_fb.

◆ er_poll_battery()

void er_poll_battery ( void )

Implementation of er_poll_battery() – the clear-the-banner glue.

Poll the fuel gauge, fold it into the nag policy, and toggle the banner.

MC/DC:
Decision: (s_batt_nag != k_ra8_batt_nag_none) && (chg || (soc > recover)) (3 conditions: banner-active, charging, soc-recovered). The ra8_batt policy's own edge / re-arm decisions are MC/DC-tested in tests/misc/src/test_ra8_batt.c; this clear-the-banner glue is exercised by the ra8_emulator battery-slider gate (dragging below 20/10 percent raises the banner; back up or toggling charge clears it) rather than a host unit test, per the hw_pending board-demo convention (no host test, like smbus_demo).

Definition at line 626 of file ereader_ui_input.c.

References er_flush_event(), er_read_battery(), er_render_nag_region(), k_display_event_chapter, k_er_batt_every, k_ra8_batt_low_pct, k_ra8_batt_nag_none, k_ra8_batt_rearm_margin, k_ra8_ok, ra8_batt_update(), s_batt_mon, s_batt_nag, and s_batt_soc.

Referenced by main().

◆ er_poll_buttons()

void er_poll_buttons ( void )

Poll SW1/SW2 and turn a page on a fresh press (#78).

Precondition
The switch pins were configured as inputs (::app_bringup_buttons).
s_display / s_fb are valid.
Postcondition
On a fresh press that turns a page, the new page is shown and flushed.
s_was_sw1 / s_was_sw2 track the held state.
Note
Not thread-safe.
Since
0.1.0

Definition at line 589 of file ereader_ui_input.c.

References er_apply_pageturn(), er_buttons_to_dir(), er_flush_event(), er_render_current(), er_sw_pressed(), k_er_screen_library, k_er_screen_reading, k_ra8_board_sw1, k_ra8_board_sw2, k_ra8_pin_none, ra8_board_sw_pin(), ra8_ui_nav_top(), s_nav, s_pending_event, s_was_sw1, and s_was_sw2.

Referenced by main().

◆ er_poll_touch()

void er_poll_touch ( void )

Poll the touch controller and dispatch a tap on a fresh press.

Precondition
ra8_gfx bound; s_nav initialised; s_display valid.
None.
Postcondition
On a press that changes the screen, the new screen is shown.
s_was_touching tracks the contact state.
Note
Not thread-safe.
Since
0.1.0

Definition at line 558 of file ereader_ui_input.c.

References er_flush_event(), er_handle_tap(), er_render_current(), er_render_nag_region(), k_er_touch_max_points, k_ra8_ok, ra8_touch_read(), s_nag_region_only, s_pending_event, s_was_touching, ra8_touch_point_t::x, and ra8_touch_point_t::y.

Referenced by main().

◆ er_read_battery()

bool er_read_battery ( uint8_t * soc,
bool * charging )
static

Read SOC + charge direction from the fuel gauge; false if absent (NAK).

Definition at line 311 of file ereader_ui_input.c.

References er_fg_read(), k_er_fg_reg_crate, k_er_fg_reg_soc, and k_er_fg_sign.

Referenced by er_poll_battery().

◆ er_render_keyboard()

void er_render_keyboard ( void )

Render the on-screen keyboard screen + collect its key targets.

Precondition
ra8_gfx is bound; s_fb reflects the framebuffer geometry.
None.
Postcondition
The framebuffer holds the keyboard; s_kb + s_targets set.
Note
Not thread-safe.
Since
0.1.0

Definition at line 267 of file ereader_ui_input.c.

References k_er_kbd_keys_vt, k_er_kbd_search_vt, k_er_paper, k_er_statusbar_h, k_er_toolbar_h, k_ra8_widget_axis_col, k_ra8_widget_refresh_quality, ra8_gfx_clear(), ra8_widget_invalidate(), ra8_widget_layout_stack(), ra8_widget_render_dirty(), and s_fb.

Referenced by er_app_render().

◆ er_round_rect()

void er_round_rect ( int32_t x,
int32_t y,
int32_t w,
int32_t h,
uint32_t c )
static

Filled rounded rect (rect cross + four corner discs).

Definition at line 103 of file ereader_ui_input.c.

References k_er_kbd_radius, ra8_gfx_circle(), and ra8_gfx_rect().

Referenced by er_draw_key().

◆ er_sw_pressed()

bool er_sw_pressed ( ra8_port_pin_t pin)
static

Read a user switch (active-low); true == pressed.

Definition at line 580 of file ereader_ui_input.c.

References k_ra8_level_high, k_ra8_level_low, k_ra8_ok, pin, and ra8_gpio_read().

Referenced by er_poll_buttons().

◆ er_tri_up()

void er_tri_up ( int32_t cx,
int32_t ay,
int32_t by,
int32_t hw,
uint32_t c )
static

Filled upward triangle from apex row ay to base row by (scanlines).

Definition at line 115 of file ereader_ui_input.c.

References ra8_gfx_line().

Referenced by er_icon_shift().

Variable Documentation

◆ k_er_kbd_keys_vt

const ra8_widget_vtable_t k_er_kbd_keys_vt = {.render = er_kbd_keys_render}
static

Definition at line 265 of file ereader_ui_input.c.

Referenced by er_render_keyboard().

◆ k_er_kbd_search_vt

const ra8_widget_vtable_t k_er_kbd_search_vt = {.render = er_kbd_search_render}
static

Vtables for the keyboard search-field / keys band widgets.

Definition at line 264 of file ereader_ui_input.c.

Referenced by er_render_keyboard().

◆ k_er_nag_crit_msg

const char k_er_nag_crit_msg[] = "Battery critical "
static

Definition at line 292 of file ereader_ui_input.c.

Referenced by er_nag_render().

◆ k_er_nag_hint

const char k_er_nag_hint[] = " (tap to dismiss)"
static

Trailing hint so the banner says how to close itself.

Definition at line 294 of file ereader_ui_input.c.

Referenced by er_nag_render().

◆ k_er_nag_low_msg

const char k_er_nag_low_msg[] = "Low battery "
static

Nag banner messages (the SOC percent + dismiss hint follow at render).

Definition at line 291 of file ereader_ui_input.c.

Referenced by er_nag_render().

◆ s_was_sw1

bool s_was_sw1
static

Debounce: true while SW1/SW2 are held, to fire once per press.

Definition at line 555 of file ereader_ui_input.c.

◆ s_was_sw2

bool s_was_sw2
static
See also
s_was_sw1

Definition at line 556 of file ereader_ui_input.c.

◆ s_was_touching

bool s_was_touching
static

Debounce: true while a contact is held, to fire once per tap.

Definition at line 552 of file ereader_ui_input.c.