cryptnox-pos 1.0.0
Standalone USDC payment terminal firmware (ESP32 + Cryptnox smart card)
Loading...
Searching...
No Matches
ui_internal.h File Reference

Private to the ui*.cpp files: the state and helpers they share. More...

#include "ui.h"
#include <Arduino.h>
#include <SPI.h>
#include <TFT_eSPI.h>
#include <XPT2046_Touchscreen.h>
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <time.h>
#include "lvgl.h"
#include "logo_img.h"
#include "logo_small.h"
#include "logo_mid.h"
#include "chain_icons.h"
#include "tap_icon.h"
#include "assets.h"
#include "settings.h"
#include "money.h"
#include "touch_cal.h"
#include "civil_time.h"
#include "provision.h"
#include "ota.h"
#include "ota_version.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "esp_timer.h"
#include "wdt.h"
#include "esp_log.h"
#include "esp_system.h"
#include "driver/ledc.h"
#include "CW_Utils.h"
Include dependency graph for ui_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define T_CS   33
#define T_IRQ   36
#define T_CLK   25
#define T_MOSI   32
#define T_MISO   39
#define SCR_W   240
#define SCR_H   320
#define LOGO_X_NUDGE   (-4)
#define COL_BG   lv_color_hex(0xFFFFFF) /* white — page background */
#define COL_SURFACE   lv_color_hex(0xF2F2F2) /* light grey — cards/secondary */
#define COL_TEXT   lv_color_hex(0x000000) /* black — primary text */
#define COL_DIM   lv_color_hex(0x9A9A9A) /* grey — secondary labels */
#define COL_TITLE   lv_color_hex(0x424242) /* dark grey — screen titles */
#define COL_ACCENT   lv_color_hex(0x22303D) /* slate — chrome, tabs, controls */
#define COL_ACTION   lv_color_hex(0x101F2E) /* charcoal blue — Charge, Confirm */
#define COL_PAGE   lv_color_hex(0xE2F5FF) /* pale sky — head of the ramp */
#define COL_PAGE_GRAD   lv_color_hex(0xA8D8F0) /* deeper sky — foot of it */
#define COL_HOME_BAR   COL_DIM /* grey — the swipe handle */
#define COL_WARN   lv_color_hex(0xE39A2D) /* amber — "not confirmed yet" */
#define COL_SUCCESS   lv_color_hex(0x1E9E50) /* green — "Sent" */
#define COL_DANGER   lv_color_hex(0xD63A3A) /* red — failures / reset */
#define COL_BORDER   lv_color_hex(0xE0E0E0) /* light grey — hairlines */
#define BTN_RADIUS   6
#define HDR_TITLE_Y
#define HDR_DIVIDER_Y   42 /* rule under the title */
#define ACT_BTN_H   46 /* bottom action-button height */
#define ACT_BTN_Y   (-8) /* bottom action-button offset */
#define FIELD_PAD_V   8
#define MENU_BTN_W   42
#define MENU_BTN_H   30
#define MENU_BTN_X   4
#define MENU_BTN_Y   6
#define ASSET_BTN_H   42
#define ASSET_BTN_X   (-8) /* right edge inset */
#define ASSET_BTN_Y   10 /* the figure's row is centred on THIS */
#define ASSET_BTN_PAD   8 /* badge inset from the left edge */
#define TAB_PAD   12 /* settings tab page padding */
#define TAB_W   (SCR_W - (2 * TAB_PAD)) /* usable tab width */
#define LV_TICK_PERIOD_MS   2
#define CAL_INSET   20 /* target centre, in from each corner */
#define CAL_VERIFY_MS   20000U /* un-confirmed calibration reverts after this */
#define WIFI_MAX_APS   16
#define ADMIN_CODE_MIN   6
#define ADMIN_CODE_MIN_STORED   4 /* shortest code an older build could store */
#define ADMIN_CODE_MAX   9
#define ACT_CHAIN_OF(chain)
#define SETTINGS_TAB_COUNT   4
#define TAB_ABOUT   3
#define AMOUNT_SMALL_CENTS_FROM   10000ULL /* 100.00 in cents */
#define AMOUNT_ROW_GAP   8
#define AMOUNT_ROW_MIN_X   4
#define CARD_X   8
#define CARD_Y   28
#define CARD_W   (SCR_W - (2 * CARD_X)) /* 224 */
#define CARD_H   262 /* 28..290; home bar sits below */
#define CARD_PAD   10
#define CARD_BTN_H   44
#define CARD_BTN_Y   (-10)
#define CARD_BTN_W   (CARD_W - (2 * CARD_PAD))
#define BAND_Y   3 /* text top: clock and chip */
#define CLOCK_X   10
#define CLOCK_Y   BAND_Y
#define CLOCK_W   42
#define CHIP_X   (CLOCK_X + CLOCK_W + 6)
#define CHIP_Y   3 /* 20px tall, so 3 centres it on the band */
#define COIN_SZ   30
#define TAP_MARK_H   65
#define PILL_H   52
#define PILL_ICON_X   10
#define OTA_CARD_W   228
#define OTA_TEXT_W   200
#define CODE_EYE_GAP   6
#define CODE_FIELD_W(kbd_w)
#define CODE_FIELD_X   (-(MENU_BTN_W + CODE_EYE_GAP) / 2)
#define CODE_KBD_W   (CARD_W - (2 * CARD_PAD))

Enumerations

enum  BtnAction {
  ACT_CONFIRM , ACT_CANCEL , ACT_SEND , ACT_NEW ,
  ACT_TX_RECHECK , ACT_CLOSE , ACT_PIN_CANCEL , ACT_PIN_REVEAL ,
  ACT_WIFI , ACT_WIFI_CANCEL , ACT_WIFI_PASS_REVEAL , ACT_ADMIN_CANCEL ,
  ACT_ADMIN_REVEAL , ACT_WELCOME_OK , ACT_PROV_OK , ACT_PROV_NO ,
  ACT_PROV_FINISH , ACT_RESET , ACT_RESET_CONFIRM , ACT_MODAL_CLOSE ,
  ACT_NET_PICK , ACT_NET_ETH , ACT_NET_POLY , ACT_NET_TRON ,
  ACT_PORTAL , ACT_PORTAL_CLOSE , ACT_OTA_OK , ACT_OTA_NO ,
  ACT_TOUCH_CAL , ACT_CAL_SAVE , ACT_CAL_CANCEL , ACT_CHAIN_BASE
}
enum  {
  PAY_STEP_NONE = -1 , PAY_STEP_AMOUNT = 0 , PAY_STEP_REVIEW , PAY_STEP_AUTH ,
  PAY_STEP_TAP , PAY_STEP__COUNT
}

Functions

void theme_init (void)
 Install the theme. After lv_disp_drv_register(), before any object.
void disp_flush (lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *px)
void touch_cal_load (void)
bool touch_raw (int16_t *rx, int16_t *ry)
void indev_read (lv_indev_drv_t *drv, lv_indev_data_t *data)
void tick_cb (void *arg)
void backlight_set_pct (uint8_t pct)
void backlight_init (uint8_t pct)
const pos_asset_t * asset (pos_chain_t c=settings_get_chain())
const char * asset_name (pos_chain_t c=settings_get_chain())
const char * asset_network (pos_chain_t c=settings_get_chain())
const char * asset_caption (pos_chain_t c=settings_get_chain())
void request_screen (ui_screen_t s)
void set_wifi_progress (const char *caption, const char *name)
uint64_t amount_cents_max (void)
void charge_set_busy (void)
void code_field_reveal (lv_obj_t *ta, lv_obj_t *eye_lbl)
void btn_event_cb (lv_event_t *e)
lv_obj_t * make_button (lv_obj_t *parent, const char *label, lv_color_t bg, lv_color_t fg, lv_coord_t w, lv_coord_t h, lv_align_t align, lv_coord_t x, lv_coord_t y, BtnAction act, const lv_font_t *font)
lv_obj_t * make_label (lv_obj_t *parent, const char *txt, lv_color_t color, const lv_font_t *font, lv_align_t align, lv_coord_t x, lv_coord_t y)
lv_obj_t * make_ghost_button (lv_obj_t *parent, const char *label, lv_coord_t w, lv_align_t align, lv_coord_t x, lv_coord_t y, BtnAction act)
void make_divider (lv_obj_t *parent, lv_coord_t y)
lv_obj_t * make_glyph_disc (lv_obj_t *parent, const char *sym, lv_color_t bg, lv_coord_t sz)
lv_obj_t * make_asset_badge (lv_obj_t *parent, pos_chain_t chain)
lv_obj_t * make_asset_button (lv_obj_t *parent)
void asset_btn_set_compact (bool compact)
lv_obj_t * make_net_badge (lv_obj_t *parent, pos_net_t net)
void make_tap_mark (lv_obj_t *parent, lv_coord_t y)
lv_obj_t * make_pill (lv_obj_t *parent, const char *title, const char *sub, lv_coord_t w, lv_coord_t y, BtnAction act, bool leaf=false)
lv_obj_t * make_field (lv_obj_t *parent, const char *caption, const char *value, lv_color_t col=COL_TEXT)
void clear_screen (void)
void paint_page (lv_obj_t *obj)
 Lay the sale-flow chrome and return the white card to build into.
lv_obj_t * make_card (lv_obj_t *parent)
lv_obj_t * build_page (int step, bool band=true)
void settings_persist (void)
void build_settings (void)
void build_touch_cal (void)
void touch_cal_poll (void)
void close_modal (void)
lv_obj_t * open_modal (lv_coord_t w, lv_coord_t h)
void open_reset_confirm (void)
lv_obj_t * ota_text (lv_obj_t *card, lv_obj_t *above, const char *txt, lv_color_t col, const lv_font_t *font)
void ota_fit_card (lv_obj_t *card, lv_obj_t *last, lv_coord_t buttons_h)
void open_portal_window (void)
void open_ota_gone (void)
void build_ota_confirm (void)
void open_network_picker (void)
void open_coin_picker (pos_net_t net)
lv_obj_t * make_icon_button (const char *sym, BtnAction act, lv_obj_t *parent=NULL)
void add_test_chip (void)
lv_obj_t * make_title (const char *txt, bool has_icon, lv_obj_t *parent=NULL)
 Screen title, centred but never underneath the top-left icon button.
void build_header (const char *title)
void build_welcome (void)
void build_prov (void)
void build_prov_confirm (void)
void build_card_wait (void)
void build_splash (void)
void build_amount (void)
void build_confirm (void)
lv_obj_t * make_numeric_keypad (lv_event_cb_t cb, lv_obj_t *parent=NULL, lv_coord_t w=CODE_KBD_W, lv_coord_t h=210)
lv_obj_t * make_code_row (lv_obj_t *host, lv_obj_t *kb, uint32_t max_len, const char *hint, BtnAction eye_act, lv_obj_t **eye_lbl)
void build_pin (void)
uint32_t admin_penalty_ms (uint8_t fails)
void build_admin_set (void)
void build_admin_unlock (void)
void build_wifi_list (void)
void build_wifi_pass (void)
void build_wifi_connecting (void)
void pop_in (lv_obj_t *obj)
void build_tx_status (void)
void build_boot_error (void)
void signal_init (void)
void render_requested_screen (void)

Variables

const lv_font_t font_inter_14
const lv_font_t font_inter_14_medium
const lv_font_t font_pjs_20_medium
const lv_font_t font_pjs_20_semibold
const lv_font_t font_pjs_28_semibold
const lv_font_t font_pjs_28_light
const lv_font_t font_icons_48
const char * TAG
TFT_eSPI tft
SPIClass touchSPI
XPT2046_Touchscreen touch
lv_color_t s_buf [SCR_W *40]
lv_disp_draw_buf_t s_draw_buf
lv_disp_drv_t s_disp_drv
lv_indev_drv_t s_indev_drv
uint16_t s_cal_xmin
uint16_t s_cal_xmax
uint16_t s_cal_ymin
uint16_t s_cal_ymax
uint32_t s_input_block_until
bool s_wait_release
lv_obj_t * s_page_card
volatile bool s_swipe_admin
uint8_t s_brightness
ui_event_cb_t s_cb
volatile ui_screen_t s_req_screen
uint64_t s_amount_units
uint64_t s_confirm_amount
char s_confirm_addr [64]
char s_confirm_fee [40]
ui_tx_state_t s_tx_state
char s_tx_info [72]
lv_obj_t * s_tx_info_lbl
uint8_t s_cal_step
int16_t s_cal_raw [2][2]
bool s_cal_pressed
int16_t s_cal_last_x
int16_t s_cal_last_y
uint32_t s_cal_deadline
lv_obj_t * s_cal_countdown
lv_obj_t * s_sheet
volatile bool s_sheet_pending
char s_card_note [64]
lv_obj_t * s_amount_label
lv_obj_t * s_amount_cents_label
lv_obj_t * s_amount_row
uint64_t s_amount_cents
lv_obj_t * s_asset_btn
lv_obj_t * s_asset_arrow
lv_obj_t * s_charge_btn
lv_obj_t * s_clock_lbl
bool s_charge_busy
lv_obj_t * s_pin_ta
char s_pin [16]
uint8_t s_pin_len
net_wifi_ap_t s_aps [WIFI_MAX_APS]
uint16_t s_ap_count
char s_wifi_ssid [33]
char s_wifi_pass [65]
char s_wifi_note [64]
lv_obj_t * s_wifi_pass_ta
lv_obj_t * s_wifi_eye_lbl
lv_obj_t * s_pin_eye_lbl
lv_obj_t * s_admin_eye_lbl
char s_wifi_caption [24]
char s_wifi_name [33]
char s_boot_step [40]
lv_obj_t * s_boot_step_lbl
lv_obj_t * s_fee_max_lbl
lv_obj_t * s_fee_prio_lbl
volatile int s_prov_step
char s_prov_msg [64]
ui_boot_err_t s_boot_err
char s_boot_detail [64]
lv_obj_t * s_admin_ta
lv_obj_t * s_admin_note_lbl
char s_admin_first [ADMIN_CODE_MAX+1]
char s_admin_note [48]
bool s_admin_confirming
char s_welcome_sub [96]
uint32_t s_admin_lock_start
uint32_t s_admin_lock_ms
bool s_admin_for_portal
bool s_pin_for_card
const char * s_addr_usdc
const char * s_addr_dest
lv_obj_t * s_reset_btn
lv_obj_t * s_close_btn
uint16_t s_settings_tab
pos_chain_t s_view_chain
volatile bool s_tz_dirty
bool s_portal_modal

Detailed Description

Private to the ui*.cpp files: the state and helpers they share.

Definition in file ui_internal.h.

Macro Definition Documentation

◆ ACT_BTN_H

#define ACT_BTN_H   46 /* bottom action-button height */

Definition at line 171 of file ui_internal.h.

Referenced by build_settings(), build_touch_cal(), and build_wifi_list().

◆ ACT_BTN_Y

#define ACT_BTN_Y   (-8) /* bottom action-button offset */

◆ ACT_CHAIN_OF

#define ACT_CHAIN_OF ( chain)
Value:
static_cast<BtnAction>(ACT_CHAIN_BASE + static_cast<int>(chain))
BtnAction
@ ACT_CHAIN_BASE

The action that selects chain.

Definition at line 267 of file ui_internal.h.

Referenced by btn_event_cb(), and open_coin_picker().

◆ ADMIN_CODE_MAX

#define ADMIN_CODE_MAX   9

Definition at line 241 of file ui_internal.h.

Referenced by admin_submit(), and build_admin_screen().

◆ ADMIN_CODE_MIN

#define ADMIN_CODE_MIN   6

Definition at line 237 of file ui_internal.h.

Referenced by admin_submit().

◆ ADMIN_CODE_MIN_STORED

#define ADMIN_CODE_MIN_STORED   4 /* shortest code an older build could store */

Definition at line 239 of file ui_internal.h.

Referenced by admin_submit().

◆ AMOUNT_ROW_GAP

#define AMOUNT_ROW_GAP   8

Definition at line 279 of file ui_internal.h.

Referenced by amount_row_place().

◆ AMOUNT_ROW_MIN_X

#define AMOUNT_ROW_MIN_X   4

Definition at line 282 of file ui_internal.h.

Referenced by amount_row_place().

◆ AMOUNT_SMALL_CENTS_FROM

#define AMOUNT_SMALL_CENTS_FROM   10000ULL /* 100.00 in cents */

Definition at line 276 of file ui_internal.h.

Referenced by amount_update_display().

◆ ASSET_BTN_H

#define ASSET_BTN_H   42

Definition at line 194 of file ui_internal.h.

Referenced by amount_row_place(), and make_asset_button().

◆ ASSET_BTN_PAD

#define ASSET_BTN_PAD   8 /* badge inset from the left edge */

Definition at line 203 of file ui_internal.h.

Referenced by make_asset_button().

◆ ASSET_BTN_X

#define ASSET_BTN_X   (-8) /* right edge inset */

Definition at line 197 of file ui_internal.h.

Referenced by make_asset_button().

◆ ASSET_BTN_Y

#define ASSET_BTN_Y   10 /* the figure's row is centred on THIS */

Definition at line 199 of file ui_internal.h.

Referenced by amount_row_place(), and make_asset_button().

◆ BAND_Y

#define BAND_Y   3 /* text top: clock and chip */

Definition at line 317 of file ui_internal.h.

◆ BTN_RADIUS

#define BTN_RADIUS   6

Definition at line 163 of file ui_internal.h.

Referenced by make_button(), and theme_styles_init().

◆ CAL_INSET

#define CAL_INSET   20 /* target centre, in from each corner */

Definition at line 222 of file ui_internal.h.

Referenced by build_touch_cal(), and cal_apply().

◆ CAL_VERIFY_MS

#define CAL_VERIFY_MS   20000U /* un-confirmed calibration reverts after this */

Definition at line 224 of file ui_internal.h.

Referenced by build_touch_cal().

◆ CARD_BTN_H

#define CARD_BTN_H   44

Definition at line 302 of file ui_internal.h.

Referenced by build_prov(), build_welcome(), and make_ghost_button().

◆ CARD_BTN_W

#define CARD_BTN_W   (CARD_W - (2 * CARD_PAD))

Definition at line 306 of file ui_internal.h.

Referenced by build_card_wait(), build_prov(), and build_welcome().

◆ CARD_BTN_Y

#define CARD_BTN_Y   (-10)

Definition at line 304 of file ui_internal.h.

Referenced by build_card_wait(), build_prov(), and build_welcome().

◆ CARD_H

#define CARD_H   262 /* 28..290; home bar sits below */

Definition at line 297 of file ui_internal.h.

Referenced by make_card().

◆ CARD_PAD

#define CARD_PAD   10

Definition at line 299 of file ui_internal.h.

Referenced by build_card_wait(), build_prov(), and build_welcome().

◆ CARD_W

#define CARD_W   (SCR_W - (2 * CARD_X)) /* 224 */

Definition at line 295 of file ui_internal.h.

Referenced by build_card_wait(), build_prov(), build_welcome(), and make_card().

◆ CARD_X

#define CARD_X   8

Definition at line 291 of file ui_internal.h.

Referenced by make_card().

◆ CARD_Y

#define CARD_Y   28

Definition at line 293 of file ui_internal.h.

Referenced by make_card().

◆ CHIP_X

#define CHIP_X   (CLOCK_X + CLOCK_W + 6)

Definition at line 325 of file ui_internal.h.

Referenced by add_test_chip().

◆ CHIP_Y

#define CHIP_Y   3 /* 20px tall, so 3 centres it on the band */

Definition at line 327 of file ui_internal.h.

Referenced by add_test_chip().

◆ CLOCK_W

#define CLOCK_W   42

Definition at line 323 of file ui_internal.h.

◆ CLOCK_X

#define CLOCK_X   10

Definition at line 319 of file ui_internal.h.

Referenced by build_page().

◆ CLOCK_Y

#define CLOCK_Y   BAND_Y

Definition at line 321 of file ui_internal.h.

Referenced by build_page().

◆ CODE_EYE_GAP

#define CODE_EYE_GAP   6

Definition at line 372 of file ui_internal.h.

Referenced by build_wifi_pass().

◆ CODE_FIELD_W

#define CODE_FIELD_W ( kbd_w)
Value:
((kbd_w) - MENU_BTN_W - CODE_EYE_GAP)
#define CODE_EYE_GAP
#define MENU_BTN_W

Definition at line 374 of file ui_internal.h.

Referenced by build_wifi_pass().

◆ CODE_FIELD_X

#define CODE_FIELD_X   (-(MENU_BTN_W + CODE_EYE_GAP) / 2)

Definition at line 376 of file ui_internal.h.

Referenced by build_wifi_pass().

◆ CODE_KBD_W

#define CODE_KBD_W   (CARD_W - (2 * CARD_PAD))

Definition at line 383 of file ui_internal.h.

Referenced by build_admin_screen().

◆ COIN_SZ

#define COIN_SZ   30

Definition at line 342 of file ui_internal.h.

Referenced by build_settings(), and make_icon_box().

◆ COL_ACCENT

#define COL_ACCENT   lv_color_hex(0x22303D) /* slate — chrome, tabs, controls */

Definition at line 136 of file ui_internal.h.

Referenced by build_prov(), build_prov_confirm(), build_settings(), and theme_styles_init().

◆ COL_ACTION

#define COL_ACTION   lv_color_hex(0x101F2E) /* charcoal blue — Charge, Confirm */

◆ COL_BG

◆ COL_BORDER

#define COL_BORDER   lv_color_hex(0xE0E0E0) /* light grey — hairlines */

◆ COL_DANGER

#define COL_DANGER   lv_color_hex(0xD63A3A) /* red — failures / reset */

◆ COL_DIM

◆ COL_HOME_BAR

#define COL_HOME_BAR   COL_DIM /* grey — the swipe handle */

Definition at line 151 of file ui_internal.h.

Referenced by build_page().

◆ COL_PAGE

#define COL_PAGE   lv_color_hex(0xE2F5FF) /* pale sky — head of the ramp */

Definition at line 146 of file ui_internal.h.

Referenced by paint_page().

◆ COL_PAGE_GRAD

#define COL_PAGE_GRAD   lv_color_hex(0xA8D8F0) /* deeper sky — foot of it */

Definition at line 148 of file ui_internal.h.

Referenced by paint_page().

◆ COL_SUCCESS

#define COL_SUCCESS   lv_color_hex(0x1E9E50) /* green — "Sent" */

Definition at line 155 of file ui_internal.h.

Referenced by build_prov().

◆ COL_SURFACE

#define COL_SURFACE   lv_color_hex(0xF2F2F2) /* light grey — cards/secondary */

◆ COL_TEXT

◆ COL_TITLE

#define COL_TITLE   lv_color_hex(0x424242) /* dark grey — screen titles */

Definition at line 131 of file ui_internal.h.

Referenced by build_page(), and make_title().

◆ COL_WARN

#define COL_WARN   lv_color_hex(0xE39A2D) /* amber — "not confirmed yet" */

Definition at line 153 of file ui_internal.h.

Referenced by signal_refresh().

◆ FIELD_PAD_V

#define FIELD_PAD_V   8

Definition at line 178 of file ui_internal.h.

Referenced by build_wifi_pass(), and make_code_field().

◆ HDR_DIVIDER_Y

#define HDR_DIVIDER_Y   42 /* rule under the title */

Definition at line 169 of file ui_internal.h.

Referenced by build_header(), and build_header_back().

◆ HDR_TITLE_Y

#define HDR_TITLE_Y
Value:
11 /* title offset — optically centred in the
42px band above the divider (font_pjs_20_medium) */

Definition at line 168 of file ui_internal.h.

Referenced by make_title().

◆ LOGO_X_NUDGE

#define LOGO_X_NUDGE   (-4)

Definition at line 118 of file ui_internal.h.

◆ LV_TICK_PERIOD_MS

#define LV_TICK_PERIOD_MS   2

Definition at line 212 of file ui_internal.h.

Referenced by tick_cb(), and ui_task().

◆ MENU_BTN_H

#define MENU_BTN_H   30

Definition at line 182 of file ui_internal.h.

Referenced by make_icon_button().

◆ MENU_BTN_W

#define MENU_BTN_W   42

Definition at line 180 of file ui_internal.h.

Referenced by make_icon_button(), and make_title().

◆ MENU_BTN_X

#define MENU_BTN_X   4

Definition at line 184 of file ui_internal.h.

Referenced by make_icon_button(), and make_title().

◆ MENU_BTN_Y

#define MENU_BTN_Y   6

Definition at line 186 of file ui_internal.h.

Referenced by make_icon_button().

◆ OTA_CARD_W

#define OTA_CARD_W   228

◆ OTA_TEXT_W

#define OTA_TEXT_W   200

◆ PILL_H

#define PILL_H   52

Definition at line 354 of file ui_internal.h.

Referenced by make_pill(), open_coin_picker(), and open_network_picker().

◆ PILL_ICON_X

#define PILL_ICON_X   10

Definition at line 356 of file ui_internal.h.

Referenced by build_settings(), open_coin_picker(), and open_network_picker().

◆ SCR_H

◆ SCR_W

◆ SETTINGS_TAB_COUNT

#define SETTINGS_TAB_COUNT   4

Definition at line 270 of file ui_internal.h.

Referenced by tab_change_cb().

◆ T_CLK

#define T_CLK   25

Definition at line 104 of file ui_internal.h.

Referenced by ui_task().

◆ T_CS

#define T_CS   33

Definition at line 100 of file ui_internal.h.

Referenced by touch(), and ui_task().

◆ T_IRQ

#define T_IRQ   36

Definition at line 102 of file ui_internal.h.

Referenced by touch().

◆ T_MISO

#define T_MISO   39

Definition at line 108 of file ui_internal.h.

Referenced by ui_task().

◆ T_MOSI

#define T_MOSI   32

Definition at line 106 of file ui_internal.h.

Referenced by ui_task().

◆ TAB_ABOUT

#define TAB_ABOUT   3

Definition at line 272 of file ui_internal.h.

Referenced by settings_bottom_bar().

◆ TAB_PAD

#define TAB_PAD   12 /* settings tab page padding */

Definition at line 205 of file ui_internal.h.

Referenced by build_settings().

◆ TAB_W

#define TAB_W   (SCR_W - (2 * TAB_PAD)) /* usable tab width */

Definition at line 207 of file ui_internal.h.

Referenced by build_settings(), and make_field().

◆ TAP_MARK_H

#define TAP_MARK_H   65

Definition at line 344 of file ui_internal.h.

Referenced by build_card_wait().

◆ WIFI_MAX_APS

#define WIFI_MAX_APS   16

Definition at line 227 of file ui_internal.h.

Referenced by ui_show_wifi_list().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PAY_STEP_NONE 
PAY_STEP_AMOUNT 
PAY_STEP_REVIEW 
PAY_STEP_AUTH 
PAY_STEP_TAP 
PAY_STEP__COUNT 

Definition at line 330 of file ui_internal.h.

◆ BtnAction

enum BtnAction
Enumerator
ACT_CONFIRM 
ACT_CANCEL 
ACT_SEND 
ACT_NEW 
ACT_TX_RECHECK 
ACT_CLOSE 
ACT_PIN_CANCEL 
ACT_PIN_REVEAL 
ACT_WIFI 
ACT_WIFI_CANCEL 
ACT_WIFI_PASS_REVEAL 
ACT_ADMIN_CANCEL 
ACT_ADMIN_REVEAL 
ACT_WELCOME_OK 
ACT_PROV_OK 
ACT_PROV_NO 
ACT_PROV_FINISH 
ACT_RESET 
ACT_RESET_CONFIRM 
ACT_MODAL_CLOSE 
ACT_NET_PICK 
ACT_NET_ETH 
ACT_NET_POLY 
ACT_NET_TRON 
ACT_PORTAL 
ACT_PORTAL_CLOSE 
ACT_OTA_OK 
ACT_OTA_NO 
ACT_TOUCH_CAL 
ACT_CAL_SAVE 
ACT_CAL_CANCEL 
ACT_CHAIN_BASE 

Definition at line 246 of file ui_internal.h.

Function Documentation

◆ add_test_chip()

void add_test_chip ( void )

Definition at line 561 of file ui_widgets.cpp.

References CHIP_X, CHIP_Y, COL_BG, COL_DANGER, font_inter_14_medium, and settings_get_mainnet().

◆ admin_penalty_ms()

uint32_t admin_penalty_ms ( uint8_t fails)

Definition at line 739 of file ui_admin.cpp.

References ADMIN_PENALTY_MAX_S.

Referenced by admin_submit(), open_admin_entry(), and ui_show_prov_auth().

◆ amount_cents_max()

uint64_t amount_cents_max ( void )

Ceiling on what the keypad will accept, for the asset currently selected.

ETH and POL are 18-decimal and the signed value is a uint64 of wei, so a sale stops at 18.44 of either (see POS_AMOUNT_UNITS_MAX_NATIVE). Enforced at the keypad rather than at the confirm step, so the mistake is never keyed.

Definition at line 265 of file ui.cpp.

References amount_cents_cap(), pos_chain_is_native_evm(), and settings_get_chain().

Referenced by amount_kbd_cb(), and btn_event_cb().

◆ asset()

const pos_asset_t * asset ( pos_chain_t c)

An asset's row — ticker, standard, caption, network. Default: the sale's.

Definition at line 189 of file ui.cpp.

References pos_asset_of().

Referenced by asset_caption(), asset_name(), and asset_network().

◆ asset_btn_set_compact()

void asset_btn_set_compact ( bool compact)

Definition at line 219 of file ui_widgets.cpp.

References s_asset_arrow.

Referenced by amount_update_display().

◆ asset_caption()

const char * asset_caption ( pos_chain_t c)

Caption for the address row above "Send to": TRX has no contract to show.

Definition at line 210 of file ui.cpp.

References asset(), and pos_asset_t::caption.

Referenced by build_settings().

◆ asset_name()

const char * asset_name ( pos_chain_t c)

Ticker of the asset being charged, for the selector and the amount screens.

Definition at line 194 of file ui.cpp.

References asset(), and pos_asset_t::ticker.

Referenced by build_settings(), make_asset_button(), and tx_amount_row().

◆ asset_network()

const char * asset_network ( pos_chain_t c)

Which network that asset lives on — the selector's subtitle.

Names the deployment, not just the family ("Ethereum" vs "Ethereum Sepolia"): it decides whether a sale settles in real money.

Definition at line 204 of file ui.cpp.

References asset(), pos_net_info_t::long_main, pos_net_info_t::long_test, pos_net_info(), and settings_net_str().

Referenced by build_settings().

◆ backlight_init()

void backlight_init ( uint8_t pct)

Definition at line 186 of file ui_hal.cpp.

References backlight_set_pct(), BL_GPIO, BL_LEDC_CH, BL_LEDC_MODE, BL_LEDC_RES, BL_LEDC_TIMER, and BL_PWM_HZ.

Referenced by ui_task().

◆ backlight_set_pct()

void backlight_set_pct ( uint8_t pct)

Definition at line 180 of file ui_hal.cpp.

References BL_LEDC_CH, and BL_LEDC_MODE.

Referenced by backlight_init(), and brightness_event_cb().

◆ btn_event_cb()

void btn_event_cb ( lv_event_t * e)

Definition at line 306 of file ui.cpp.

References ACT_ADMIN_CANCEL, ACT_ADMIN_REVEAL, ACT_CAL_CANCEL, ACT_CAL_SAVE, ACT_CANCEL, ACT_CHAIN_BASE, ACT_CHAIN_OF, ACT_CLOSE, ACT_CONFIRM, ACT_MODAL_CLOSE, ACT_NET_ETH, ACT_NET_PICK, ACT_NET_POLY, ACT_NET_TRON, ACT_NEW, ACT_OTA_NO, ACT_OTA_OK, ACT_PIN_CANCEL, ACT_PIN_REVEAL, ACT_PORTAL, ACT_PORTAL_CLOSE, ACT_PROV_FINISH, ACT_PROV_NO, ACT_PROV_OK, ACT_RESET, ACT_RESET_CONFIRM, ACT_SEND, ACT_TOUCH_CAL, ACT_TX_RECHECK, ACT_WELCOME_OK, ACT_WIFI, ACT_WIFI_CANCEL, ACT_WIFI_PASS_REVEAL, amount_cents_max(), charge_set_busy(), close_modal(), code_field_reveal(), open_coin_picker(), open_network_picker(), open_ota_gone(), open_portal_window(), open_reset_confirm(), ota_commit(), POS_CHAIN__COUNT, POS_NET_ETH, POS_NET_POLY, POS_NET_TRON, prov_auth_resolve(), prov_mode(), PROV_MODE_WIZARD, prov_pending_commit(), request_prov_stop(), request_screen(), s_admin_eye_lbl, s_admin_first, s_admin_for_portal, s_admin_ta, s_amount_cents, s_amount_units, s_cal_pressed, s_cal_prev, s_cal_step, s_cal_xmax, s_cal_xmin, s_cal_ymax, s_cal_ymin, s_cb, s_cb, s_pin, s_pin_eye_lbl, s_pin_for_card, s_pin_len, s_pin_ta, s_req_screen, s_settings_return, s_view_chain, s_welcome_sent, s_wifi_eye_lbl, s_wifi_pass, s_wifi_pass_ta, set_wifi_progress(), settings_factory_reset(), settings_persist(), settings_set_chain(), settings_set_touch_cal(), touch_cal_load(), UI_EVENT_AMOUNT_CONFIRMED, UI_EVENT_CONFIRM_CANCEL, UI_EVENT_PROV_FINISH, UI_EVENT_TX_RECHECK, UI_EVENT_TX_RETRY, UI_EVENT_WELCOME_DONE, UI_EVENT_WIFI_SCAN, ui_refresh_addresses(), UI_SCREEN_AMOUNT, UI_SCREEN_CONFIRM, UI_SCREEN_PIN, UI_SCREEN_PROV, UI_SCREEN_SETTINGS, UI_SCREEN_TOUCH_CAL, and UI_SCREEN_WIFI_CONNECTING.

Referenced by make_asset_button(), make_button(), make_icon_button(), and make_pill().

◆ build_admin_set()

void build_admin_set ( void )

Definition at line 922 of file ui_admin.cpp.

References build_admin_screen(), and s_admin_confirming.

Referenced by render_requested_screen().

◆ build_admin_unlock()

void build_admin_unlock ( void )

Definition at line 929 of file ui_admin.cpp.

References build_admin_screen(), prov_pair_code(), and s_admin_for_portal.

Referenced by render_requested_screen().

◆ build_amount()

void build_amount ( void )

Definition at line 330 of file ui_sale.cpp.

Referenced by render_requested_screen().

◆ build_boot_error()

◆ build_card_wait()

◆ build_confirm()

void build_confirm ( void )

Definition at line 400 of file ui_sale.cpp.

Referenced by render_requested_screen().

◆ build_header()

void build_header ( const char * title)

Definition at line 617 of file ui_widgets.cpp.

References HDR_DIVIDER_Y, make_divider(), and make_title().

Referenced by build_boot_error(), build_touch_cal(), and build_wifi_connecting().

◆ build_ota_confirm()

◆ build_page()

lv_obj_t * build_page ( int step,
bool band = true )

◆ build_pin()

void build_pin ( void )

Definition at line 643 of file ui_sale.cpp.

Referenced by render_requested_screen().

◆ build_prov()

◆ build_prov_confirm()

◆ build_settings()

◆ build_splash()

void build_splash ( void )

Definition at line 295 of file ui_sale.cpp.

Referenced by render_requested_screen().

◆ build_touch_cal()

◆ build_tx_status()

void build_tx_status ( void )

Definition at line 734 of file ui_sale.cpp.

Referenced by render_requested_screen().

◆ build_welcome()

◆ build_wifi_connecting()

void build_wifi_connecting ( void )

◆ build_wifi_list()

◆ build_wifi_pass()

◆ charge_set_busy()

void charge_set_busy ( void )

Charge has been tapped: inert until this screen is next built.

A gate, not a look: it does not repaint the button. It stops a second UI_EVENT_AMOUNT_CONFIRMED queued behind the first, whose echo would otherwise pull an operator who double-tapped Charge back out of the PIN keypad.

Definition at line 100 of file ui_sale.cpp.

References s_charge_btn, and s_charge_busy.

Referenced by btn_event_cb().

◆ clear_screen()

◆ close_modal()

void close_modal ( void )

Definition at line 424 of file ui_admin.cpp.

References s_modal, and s_portal_modal.

Referenced by btn_event_cb(), open_modal(), render_requested_screen(), and ui_task().

◆ code_field_reveal()

void code_field_reveal ( lv_obj_t * ta,
lv_obj_t * eye_lbl )

Flip a masked field between hidden and shown, and swap its eye glyph to match.

Toggled in place, never via request_screen(): rebuilding the screen would discard what has been typed, which on the PIN keypad costs the operator an attempt the card is counting. The glyph shows what the next tap does. Either argument may be NULL; nothing but convention ties the action to its screen.

Definition at line 286 of file ui_sale.cpp.

Referenced by btn_event_cb().

◆ disp_flush()

void disp_flush ( lv_disp_drv_t * drv,
const lv_area_t * area,
lv_color_t * px )

Definition at line 22 of file ui_hal.cpp.

References tft.

Referenced by ui_task().

◆ indev_read()

void indev_read ( lv_indev_drv_t * drv,
lv_indev_data_t * data )

◆ make_asset_badge()

lv_obj_t * make_asset_badge ( lv_obj_t * parent,
pos_chain_t chain )

◆ make_asset_button()

◆ make_button()

lv_obj_t * make_button ( lv_obj_t * parent,
const char * label,
lv_color_t bg,
lv_color_t fg,
lv_coord_t w,
lv_coord_t h,
lv_align_t align,
lv_coord_t x,
lv_coord_t y,
BtnAction act,
const lv_font_t * font )

◆ make_card()

lv_obj_t * make_card ( lv_obj_t * parent)

Definition at line 481 of file ui_widgets.cpp.

References CARD_H, CARD_W, CARD_X, CARD_Y, and COL_BG.

Referenced by build_admin_screen(), and build_page().

◆ make_code_row()

lv_obj_t * make_code_row ( lv_obj_t * host,
lv_obj_t * kb,
uint32_t max_len,
const char * hint,
BtnAction eye_act,
lv_obj_t ** eye_lbl )

Definition at line 615 of file ui_sale.cpp.

References make_code_field(), and make_icon_button().

Referenced by build_admin_screen().

◆ make_divider()

void make_divider ( lv_obj_t * parent,
lv_coord_t y )

Definition at line 91 of file ui_widgets.cpp.

References COL_BORDER, and SCR_W.

Referenced by build_header(), and build_header_back().

◆ make_field()

lv_obj_t * make_field ( lv_obj_t * parent,
const char * caption,
const char * value,
lv_color_t col = COL_TEXT )

Definition at line 316 of file ui_widgets.cpp.

References COL_DIM, font_inter_14, font_inter_14_medium, make_label(), and TAB_W.

Referenced by build_settings().

◆ make_ghost_button()

lv_obj_t * make_ghost_button ( lv_obj_t * parent,
const char * label,
lv_coord_t w,
lv_align_t align,
lv_coord_t x,
lv_coord_t y,
BtnAction act )

Definition at line 78 of file ui_widgets.cpp.

References CARD_BTN_H, COL_BG, COL_BORDER, COL_TEXT, font_pjs_20_semibold, and make_button().

Referenced by build_card_wait().

◆ make_glyph_disc()

lv_obj_t * make_glyph_disc ( lv_obj_t * parent,
const char * sym,
lv_color_t bg,
lv_coord_t sz )

Definition at line 103 of file ui_widgets.cpp.

References COL_BG, and font_inter_14.

Referenced by build_settings().

◆ make_icon_button()

lv_obj_t * make_icon_button ( const char * sym,
BtnAction act,
lv_obj_t * parent = NULL )

◆ make_label()

lv_obj_t * make_label ( lv_obj_t * parent,
const char * txt,
lv_color_t color,
const lv_font_t * font,
lv_align_t align,
lv_coord_t x,
lv_coord_t y )

◆ make_net_badge()

lv_obj_t * make_net_badge ( lv_obj_t * parent,
pos_net_t net )

Definition at line 227 of file ui_widgets.cpp.

References make_icon_box(), and NET_ICON.

Referenced by open_network_picker().

◆ make_numeric_keypad()

lv_obj_t * make_numeric_keypad ( lv_event_cb_t cb,
lv_obj_t * parent = NULL,
lv_coord_t w = CODE_KBD_W,
lv_coord_t h = 210 )

Definition at line 576 of file ui_sale.cpp.

Referenced by build_admin_screen().

◆ make_pill()

lv_obj_t * make_pill ( lv_obj_t * parent,
const char * title,
const char * sub,
lv_coord_t w,
lv_coord_t y,
BtnAction act,
bool leaf = false )

◆ make_tap_mark()

void make_tap_mark ( lv_obj_t * parent,
lv_coord_t y )

Definition at line 252 of file ui_widgets.cpp.

References COL_TAP_MARK, and tap_icon.

Referenced by build_card_wait().

◆ make_title()

lv_obj_t * make_title ( const char * txt,
bool has_icon,
lv_obj_t * parent )

Screen title, centred but never underneath the top-left icon button.

The title gets the gap between two symmetric gutters; if it does not fit at 20px it drops to the 14px face rather than overlapping the icon or eliding. The width cap and LONG_DOT are the backstop for a title too long even at 14px.

Parameters
has_icontrue when make_icon_button() has put a glyph in the top-left.

Definition at line 586 of file ui_widgets.cpp.

References COL_TITLE, font_inter_14_medium, font_pjs_20_medium, HDR_TITLE_Y, make_label(), MENU_BTN_W, MENU_BTN_X, and SCR_W.

Referenced by build_admin_screen(), build_header(), and build_header_back().

◆ open_coin_picker()

◆ open_modal()

lv_obj_t * open_modal ( lv_coord_t w,
lv_coord_t h )

◆ open_network_picker()

◆ open_ota_gone()

void open_ota_gone ( void )

Accept or refuse firmware that the update page has uploaded.

The upload is already verified (SHA-256, and the signature on a signed build), so this asks whether the person holding the terminal wants this version, which a browser cannot answer. A downgrade is called out: it is properly signed too, and returning to firmware with a known fault is something to be talked into. Install was tapped and there was nothing left to install.

Says so, so a terminal that stayed on the old firmware does not look updated.

Definition at line 581 of file ui_admin.cpp.

References ACT_MODAL_CLOSE, COL_ACTION, COL_BG, COL_TEXT, font_inter_14, font_pjs_20_semibold, make_button(), open_modal(), OTA_CARD_W, ota_fit_card(), ota_text(), and OTA_TEXT_W.

Referenced by btn_event_cb().

◆ open_portal_window()

◆ open_reset_confirm()

void open_reset_confirm ( void )

◆ ota_fit_card()

void ota_fit_card ( lv_obj_t * card,
lv_obj_t * last,
lv_coord_t buttons_h )

Resize the card to the text it ended up with, leaving room for the buttons.

buttons_h is how far the button block reaches up from the content bottom — 42 for one 40 px button at -2, 86 for two. Clamped to the screen, so a pathological string elides off the bottom rather than drawing a card taller than the panel.

Definition at line 502 of file ui_admin.cpp.

References OTA_CARD_PAD, OTA_GAP, and SCR_H.

Referenced by build_ota_confirm(), build_prov_confirm(), open_ota_gone(), and open_portal_window().

◆ ota_text()

lv_obj_t * ota_text ( lv_obj_t * card,
lv_obj_t * above,
const char * txt,
lv_color_t col,
const lv_font_t * font )

Wrapped, centred body text stacked under above (or the card top).

Definition at line 477 of file ui_admin.cpp.

References make_label(), OTA_GAP, and OTA_TEXT_W.

Referenced by build_ota_confirm(), build_prov_confirm(), open_ota_gone(), and open_portal_window().

◆ paint_page()

void paint_page ( lv_obj_t * obj)

Lay the sale-flow chrome and return the white card to build into.

Parameters
stepWhich step of the sale this is (PAY_STEP_*). Currently unused.
Returns
The card. Children use ITS coordinates: (0,0) is the card's top-left, CARD_W x CARD_H.

Definition at line 470 of file ui_widgets.cpp.

References COL_PAGE, and COL_PAGE_GRAD.

Referenced by build_admin_screen(), and build_page().

◆ pop_in()

void pop_in ( lv_obj_t * obj)

Definition at line 673 of file ui_sale.cpp.

References zoom_anim_cb().

Referenced by build_boot_error(), build_prov(), and build_welcome().

◆ render_requested_screen()

◆ request_screen()

◆ set_wifi_progress()

void set_wifi_progress ( const char * caption,
const char * name )

Definition at line 247 of file ui.cpp.

References s_wifi_caption, and s_wifi_name.

Referenced by admin_submit(), btn_event_cb(), ui_show_wifi_connecting(), and wifi_pass_kb_cb().

◆ settings_persist()

void settings_persist ( void )

Definition at line 19 of file ui_admin.cpp.

References s_brightness, and settings_set_brightness().

Referenced by btn_event_cb().

◆ signal_init()

void signal_init ( void )

◆ theme_init()

void theme_init ( void )

Install the theme. After lv_disp_drv_register(), before any object.

Copied from the active theme and parented to it, so the default styling still runs first and this only adds on top.

Definition at line 157 of file ui_theme.cpp.

References font_inter_14, s_theme, theme_apply(), and theme_styles_init().

Referenced by ui_task().

◆ tick_cb()

void tick_cb ( void * arg)

Definition at line 165 of file ui_hal.cpp.

References LV_TICK_PERIOD_MS.

Referenced by ui_task().

◆ touch_cal_load()

void touch_cal_load ( void )

Definition at line 43 of file ui_hal.cpp.

References s_cal_xmax, s_cal_xmin, s_cal_ymax, s_cal_ymin, and settings_get_touch_cal().

Referenced by btn_event_cb(), and ui_task().

◆ touch_cal_poll()

void touch_cal_poll ( void )

◆ touch_raw()

bool touch_raw ( int16_t * rx,
int16_t * ry )

Definition at line 49 of file ui_hal.cpp.

References touch.

Referenced by touch_cal_poll().

Variable Documentation

◆ font_icons_48

const lv_font_t font_icons_48
extern

Definition at line 444 of file font_icons_48.c.

Referenced by build_boot_error(), and build_prov().

◆ font_inter_14

◆ font_inter_14_medium

◆ font_pjs_20_medium

◆ font_pjs_20_semibold

◆ font_pjs_28_light

const lv_font_t font_pjs_28_light
extern

Definition at line 4807 of file font_pjs_28_light.c.

◆ font_pjs_28_semibold

const lv_font_t font_pjs_28_semibold
extern

Definition at line 5019 of file font_pjs_28_semibold.c.

Referenced by amount_row_place(), and build_ota_confirm().

◆ s_addr_dest

const char* s_addr_dest
extern

Definition at line 168 of file ui.cpp.

Referenced by build_settings(), and ui_set_addresses().

◆ s_addr_usdc

const char* s_addr_usdc
extern

Definition at line 167 of file ui.cpp.

Referenced by build_settings(), and ui_set_addresses().

◆ s_admin_confirming

bool s_admin_confirming
extern

◆ s_admin_eye_lbl

lv_obj_t* s_admin_eye_lbl
extern

Definition at line 109 of file ui.cpp.

Referenced by btn_event_cb(), and build_admin_screen().

◆ s_admin_first

char s_admin_first[ADMIN_CODE_MAX+1]
extern

Definition at line 147 of file ui.cpp.

Referenced by admin_submit(), btn_event_cb(), and ui_show_admin_set().

◆ s_admin_for_portal

bool s_admin_for_portal
extern

◆ s_admin_lock_ms

uint32_t s_admin_lock_ms
extern

Definition at line 156 of file ui.cpp.

Referenced by admin_lock_remaining_s(), admin_submit(), open_admin_entry(), and ui_show_prov_auth().

◆ s_admin_lock_start

uint32_t s_admin_lock_start
extern

Definition at line 155 of file ui.cpp.

Referenced by admin_lock_remaining_s(), admin_submit(), open_admin_entry(), and ui_show_prov_auth().

◆ s_admin_note

char s_admin_note[48]
extern

◆ s_admin_note_lbl

lv_obj_t* s_admin_note_lbl
extern

Definition at line 146 of file ui.cpp.

Referenced by admin_set_note(), build_admin_screen(), and clear_screen().

◆ s_admin_ta

lv_obj_t* s_admin_ta
extern

Definition at line 145 of file ui.cpp.

Referenced by admin_kbd_cb(), admin_submit(), btn_event_cb(), build_admin_screen(), and clear_screen().

◆ s_amount_cents

uint64_t s_amount_cents
extern

Definition at line 77 of file ui.cpp.

Referenced by amount_kbd_cb(), amount_update_display(), btn_event_cb(), and ui_show_amount_entry().

◆ s_amount_cents_label

lv_obj_t* s_amount_cents_label
extern

Definition at line 73 of file ui.cpp.

Referenced by amount_update_display(), and clear_screen().

◆ s_amount_label

lv_obj_t* s_amount_label
extern

Definition at line 72 of file ui.cpp.

Referenced by amount_update_display(), and clear_screen().

◆ s_amount_row

lv_obj_t* s_amount_row
extern

Definition at line 76 of file ui.cpp.

Referenced by amount_row_place(), and clear_screen().

◆ s_amount_units

uint64_t s_amount_units
extern

Definition at line 37 of file ui.cpp.

Referenced by amount_update_display(), btn_event_cb(), and ui_show_amount_entry().

◆ s_ap_count

uint16_t s_ap_count
extern

Definition at line 102 of file ui.cpp.

◆ s_aps

net_wifi_ap_t s_aps[WIFI_MAX_APS]
extern

Definition at line 101 of file ui.cpp.

◆ s_asset_arrow

lv_obj_t* s_asset_arrow
extern

Definition at line 82 of file ui.cpp.

Referenced by asset_btn_set_compact(), clear_screen(), and make_asset_button().

◆ s_asset_btn

lv_obj_t* s_asset_btn
extern

Definition at line 81 of file ui.cpp.

Referenced by amount_row_place(), clear_screen(), and make_asset_button().

◆ s_boot_detail

char s_boot_detail[64]
extern

Definition at line 144 of file ui.cpp.

Referenced by build_boot_error(), and ui_show_boot_error().

◆ s_boot_err

ui_boot_err_t s_boot_err
extern

Definition at line 143 of file ui.cpp.

Referenced by build_boot_error(), and ui_show_boot_error().

◆ s_boot_step

char s_boot_step[40]
extern

Definition at line 119 of file ui.cpp.

Referenced by ui_set_boot_status(), and ui_task().

◆ s_boot_step_lbl

lv_obj_t* s_boot_step_lbl
extern

Definition at line 120 of file ui.cpp.

Referenced by clear_screen(), and ui_task().

◆ s_brightness

uint8_t s_brightness
extern

Definition at line 179 of file ui_hal.cpp.

Referenced by brightness_event_cb(), build_settings(), settings_persist(), and ui_task().

◆ s_buf

lv_color_t s_buf[SCR_W *40]
extern

Definition at line 18 of file ui_hal.cpp.

Referenced by ui_task().

◆ s_cal_countdown

lv_obj_t* s_cal_countdown
extern

Definition at line 57 of file ui.cpp.

Referenced by build_touch_cal(), clear_screen(), and ui_task().

◆ s_cal_deadline

uint32_t s_cal_deadline
extern

Definition at line 56 of file ui.cpp.

Referenced by build_touch_cal(), and ui_task().

◆ s_cal_last_x

int16_t s_cal_last_x
extern

Definition at line 53 of file ui.cpp.

Referenced by touch_cal_poll().

◆ s_cal_last_y

int16_t s_cal_last_y
extern

Definition at line 54 of file ui.cpp.

Referenced by touch_cal_poll().

◆ s_cal_pressed

bool s_cal_pressed
extern

Definition at line 52 of file ui.cpp.

Referenced by btn_event_cb(), and touch_cal_poll().

◆ s_cal_raw

int16_t s_cal_raw[2][2]
extern

Definition at line 51 of file ui.cpp.

Referenced by cal_apply(), and touch_cal_poll().

◆ s_cal_step

uint8_t s_cal_step
extern

Definition at line 50 of file ui.cpp.

Referenced by btn_event_cb(), build_touch_cal(), touch_cal_poll(), and ui_task().

◆ s_cal_xmax

uint16_t s_cal_xmax
extern

Definition at line 40 of file ui_hal.cpp.

Referenced by btn_event_cb(), cal_apply(), touch_cal_load(), touch_to_screen(), and ui_task().

◆ s_cal_xmin

uint16_t s_cal_xmin
extern

Definition at line 39 of file ui_hal.cpp.

Referenced by btn_event_cb(), cal_apply(), touch_cal_load(), touch_to_screen(), and ui_task().

◆ s_cal_ymax

uint16_t s_cal_ymax
extern

Definition at line 42 of file ui_hal.cpp.

Referenced by btn_event_cb(), cal_apply(), touch_cal_load(), touch_to_screen(), and ui_task().

◆ s_cal_ymin

uint16_t s_cal_ymin
extern

Definition at line 41 of file ui_hal.cpp.

Referenced by btn_event_cb(), cal_apply(), touch_cal_load(), touch_to_screen(), and ui_task().

◆ s_card_note

char s_card_note[64]
extern

Definition at line 67 of file ui.cpp.

Referenced by build_card_wait(), pin_submit(), and ui_show_card_wait().

◆ s_cb

ui_event_cb_t s_cb
extern

Definition at line 31 of file ui.cpp.

Referenced by btn_event_cb(), and request_prov_stop().

◆ s_charge_btn

lv_obj_t* s_charge_btn
extern

Definition at line 86 of file ui.cpp.

Referenced by charge_set_busy(), charge_set_enabled(), and clear_screen().

◆ s_charge_busy

bool s_charge_busy
extern

Definition at line 94 of file ui.cpp.

Referenced by amount_update_display(), charge_set_busy(), and clear_screen().

◆ s_clock_lbl

lv_obj_t* s_clock_lbl
extern

Definition at line 90 of file ui.cpp.

Referenced by build_page(), clear_screen(), and clock_refresh().

◆ s_close_btn

lv_obj_t* s_close_btn
extern

Definition at line 172 of file ui.cpp.

Referenced by build_settings(), clear_screen(), and settings_bottom_bar().

◆ s_confirm_addr

char s_confirm_addr[64]
extern

Definition at line 41 of file ui.cpp.

Referenced by ui_show_confirm().

◆ s_confirm_amount

uint64_t s_confirm_amount
extern

Definition at line 40 of file ui.cpp.

Referenced by ui_show_confirm().

◆ s_confirm_fee

char s_confirm_fee[40]
extern

Definition at line 42 of file ui.cpp.

Referenced by ui_show_confirm().

◆ s_disp_drv

lv_disp_drv_t s_disp_drv
extern

Definition at line 20 of file ui_hal.cpp.

Referenced by ui_task().

◆ s_draw_buf

lv_disp_draw_buf_t s_draw_buf
extern

Definition at line 19 of file ui_hal.cpp.

Referenced by ui_task().

◆ s_fee_max_lbl

lv_obj_t* s_fee_max_lbl
extern

Definition at line 126 of file ui.cpp.

Referenced by build_settings(), clear_screen(), and ui_task().

◆ s_fee_prio_lbl

lv_obj_t* s_fee_prio_lbl
extern

Definition at line 127 of file ui.cpp.

Referenced by build_settings(), clear_screen(), and ui_task().

◆ s_indev_drv

lv_indev_drv_t s_indev_drv
extern

Definition at line 21 of file ui_hal.cpp.

Referenced by ui_task().

◆ s_input_block_until

uint32_t s_input_block_until
extern

Definition at line 79 of file ui_hal.cpp.

Referenced by indev_read(), and render_requested_screen().

◆ s_page_card

lv_obj_t* s_page_card
extern

Definition at line 84 of file ui_hal.cpp.

Referenced by build_page(), clear_screen(), and indev_read().

◆ s_pin

char s_pin[16]
extern

Definition at line 99 of file ui.cpp.

Referenced by btn_event_cb(), pin_submit(), and ui_take_pin().

◆ s_pin_eye_lbl

lv_obj_t* s_pin_eye_lbl
extern

Definition at line 108 of file ui.cpp.

Referenced by btn_event_cb(), and clear_screen().

◆ s_pin_for_card

bool s_pin_for_card
extern

Definition at line 164 of file ui.cpp.

Referenced by btn_event_cb(), pin_submit(), signal_refresh(), and ui_show_card_pin().

◆ s_pin_len

uint8_t s_pin_len
extern

Definition at line 100 of file ui.cpp.

Referenced by btn_event_cb(), pin_submit(), and ui_take_pin().

◆ s_pin_ta

lv_obj_t* s_pin_ta
extern

Definition at line 98 of file ui.cpp.

Referenced by btn_event_cb(), clear_screen(), pin_kbd_cb(), and pin_submit().

◆ s_portal_modal

bool s_portal_modal
extern

Definition at line 423 of file ui_admin.cpp.

Referenced by build_ota_confirm(), close_modal(), open_portal_window(), and ui_task().

◆ s_prov_msg

char s_prov_msg[64]
extern

Definition at line 136 of file ui.cpp.

Referenced by build_prov(), ui_set_prov_note(), and ui_show_card_pin().

◆ s_prov_step

volatile int s_prov_step
extern

Definition at line 132 of file ui.cpp.

Referenced by build_prov(), and ui_show_prov().

◆ s_req_screen

volatile ui_screen_t s_req_screen
extern

◆ s_reset_btn

lv_obj_t* s_reset_btn
extern

Definition at line 171 of file ui.cpp.

Referenced by build_settings(), clear_screen(), and settings_bottom_bar().

◆ s_settings_tab

uint16_t s_settings_tab
extern

Definition at line 180 of file ui.cpp.

Referenced by build_settings(), open_admin_entry(), and tab_change_cb().

◆ s_sheet

lv_obj_t* s_sheet
extern

Definition at line 62 of file ui.cpp.

Referenced by build_admin_screen(), and render_requested_screen().

◆ s_sheet_pending

volatile bool s_sheet_pending
extern

Definition at line 63 of file ui.cpp.

Referenced by open_admin_entry(), and render_requested_screen().

◆ s_swipe_admin

volatile bool s_swipe_admin
extern

Definition at line 103 of file ui_hal.cpp.

Referenced by indev_read(), and ui_task().

◆ s_tx_info

char s_tx_info[72]
extern

Definition at line 47 of file ui.cpp.

Referenced by pin_submit(), ui_set_tx_info(), ui_show_tx_status(), and ui_task().

◆ s_tx_info_lbl

lv_obj_t* s_tx_info_lbl
extern

Definition at line 48 of file ui.cpp.

Referenced by clear_screen(), and ui_task().

◆ s_tx_state

ui_tx_state_t s_tx_state
extern

Definition at line 46 of file ui.cpp.

Referenced by pin_submit(), render_requested_screen(), and ui_show_tx_status().

◆ s_tz_dirty

volatile bool s_tz_dirty
extern

Definition at line 419 of file ui_widgets.cpp.

Referenced by clock_refresh(), and ui_clock_changed().

◆ s_view_chain

pos_chain_t s_view_chain
extern

Definition at line 186 of file ui.cpp.

Referenced by admin_submit(), btn_event_cb(), build_settings(), and open_admin_entry().

◆ s_wait_release

bool s_wait_release
extern

Definition at line 80 of file ui_hal.cpp.

Referenced by indev_read(), and render_requested_screen().

◆ s_welcome_sub

char s_welcome_sub[96]
extern

Definition at line 151 of file ui.cpp.

Referenced by build_welcome(), and ui_show_welcome().

◆ s_wifi_caption

char s_wifi_caption[24]
extern

Definition at line 114 of file ui.cpp.

Referenced by build_wifi_connecting(), and set_wifi_progress().

◆ s_wifi_eye_lbl

lv_obj_t* s_wifi_eye_lbl
extern

Definition at line 107 of file ui.cpp.

Referenced by btn_event_cb(), build_wifi_pass(), and clear_screen().

◆ s_wifi_name

char s_wifi_name[33]
extern

Definition at line 115 of file ui.cpp.

Referenced by build_wifi_connecting(), and set_wifi_progress().

◆ s_wifi_note

char s_wifi_note[64]
extern

Definition at line 105 of file ui.cpp.

Referenced by build_wifi_list(), and ui_show_wifi_list().

◆ s_wifi_pass

char s_wifi_pass[65]
extern

Definition at line 104 of file ui.cpp.

Referenced by btn_event_cb(), ui_stage_wifi_creds(), ui_take_wifi_creds(), and wifi_pass_kb_cb().

◆ s_wifi_pass_ta

lv_obj_t* s_wifi_pass_ta
extern

Definition at line 106 of file ui.cpp.

Referenced by btn_event_cb(), build_wifi_pass(), clear_screen(), and wifi_pass_kb_cb().

◆ s_wifi_ssid

char s_wifi_ssid[33]
extern

◆ TAG

const char* TAG
extern

Definition at line 23 of file ui.cpp.

◆ tft

TFT_eSPI tft
extern

Definition at line 14 of file ui_hal.cpp.

Referenced by disp_flush(), and ui_task().

◆ touch

XPT2046_Touchscreen touch
extern

Referenced by touch_raw(), touch_to_screen(), and ui_task().

◆ touchSPI

SPIClass touchSPI
extern

Referenced by ui_task().