Network bring-up: Wi-Fi station (init/scan/connect/RSSI) and SNTP time sync. No application-protocol ...
A scanned access point (subset of fields the UI needs).
void ui_set_prov_note(const char *msg)
Put a failure line on the setup screen, in red under the step title.
void ui_show_prov(int step)
Show the setup screen: QR code, AP name and passphrase.
void ui_show_confirm(uint64_t amount_units, const char *dest_addr, const char *fee)
Switch to the confirm screen.
void ui_show_prov_auth(void)
Demand the admin code so a browser can be authorised.
void ui_show_welcome(const char *sub)
Greet the operator at the start of first-run setup, or after an update.
void ui_set_boot_status(const char *step)
Set the one-line progress note on the splash screen.
void ui_show_wifi_list(const net_wifi_ap_t *aps, uint16_t n, const char *note)
Show the scanned Wi-Fi networks for the user to pick from.
ui_screen_t
Top-level screens of the payment flow.
@ UI_SCREEN_WIFI_CONNECTING
void ui_show_card_pin(void)
Ask for the card PIN before reading an address off a Cryptnox card.
ui_tx_state_t
States shown on the transaction-status screen.
@ UI_TX_STATE_UNCONFIRMED
void ui_show_ota_confirm(void)
Raise the modal that asks the operator to accept a firmware image the update page has uploaded,...
void ui_refresh_addresses_for(uint8_t chain)
Same, for any chain (a pos_chain_t) rather than the one sales use.
void ui_init(ui_event_cb_t cb)
Initialise display + touch and start the UI task.
size_t ui_take_wifi_creds(char *ssid, size_t ssid_n, char *pass, size_t pass_n)
Fetch the selected SSID + entered password and wipe the UI's copy.
void ui_set_addresses(const char *token_contract, const char *dest_addr)
Provide the token contract and destination addresses for the confirm screen and the settings "Tx" tab...
void ui_fees_changed(void)
Note that the stored gas caps have changed, so the Tx tab can catch up.
void ui_show_tx_status(ui_tx_state_t state, const char *info)
Switch to the transaction-status screen.
void ui_stage_wifi_creds(const char *ssid, const char *pass)
Load credentials into the same handoff buffers the picker fills.
void ui_show_amount_entry(void)
Switch to the amount-entry screen (forces a value redraw).
void ui_show_prov_confirm(void)
Raise the modal that asks the operator to accept a value a browser proposed, reading the pending prop...
void ui_refresh_addresses(void)
Implemented by main: repoint those two rows at the selected chain.
ui_event_t
Events emitted by the UI task towards the main task.
@ UI_EVENT_CONFIRM_CANCEL
@ UI_EVENT_AMOUNT_CONFIRMED
@ UI_EVENT_PROV_VALUE_SET
ui_boot_err_t
Startup faults shown on UI_SCREEN_BOOT_ERROR.
void ui_show_admin_set(void)
Run the first-run admin-code creation (enter, then confirm).
void ui_set_tx_info(const char *info)
Replace the transaction screen's info line without rebuilding it.
void ui_show_splash(void)
Switch to the splash screen.
void ui_show_wifi_connecting(const char *ssid)
Show a "Connecting to <ssid>…" screen while main associates.
void ui_show_card_wait(const char *note)
"Hold your card to the reader" while the address is read.
void ui_show_boot_error(ui_boot_err_t kind, const char *detail)
Show a startup fault, naming the cause and what to do about it.
size_t ui_take_pin(char *out, size_t n)
Copy the most recently entered PIN out and wipe the UI's copy.
void ui_clock_changed(void)
Note that the stored UTC offset has changed, so the clock can catch up.
void(* ui_event_cb_t)(ui_event_t event, uint64_t payload)
Callback invoked from the UI task on user interaction.