21 #if defined(HAVE_BOLOS)
22 #include "bolos_privileged_ux.h"
34 #define BUTTON_RIGHT 2
66 #define UX_INIT() nbgl_objInit();
70 #define UX_FORWARD_EVENT_REDRAWCB(bypasspincheck, \
74 os_sched_last_status, \
77 ignoring_app_if_ux_busy) \
78 ux_params.ux_id = BOLOS_UX_EVENT; \
81 ux_params.len = os_sched_last_status(TASK_BOLOS_UX); \
82 if (ux.asynchmodal_end_callback \
83 && os_ux_get_status(BOLOS_UX_ASYNCHMODAL_PAIRING_REQUEST) != 0) { \
84 asynchmodal_end_callback_t cb = ux.asynchmodal_end_callback; \
85 ux.asynchmodal_end_callback = NULL; \
86 cb(os_ux_get_status(BOLOS_UX_ASYNCHMODAL_PAIRING_REQUEST)); \
95 #define UX_WAKE_UP() \
96 G_ux_params.ux_id = BOLOS_UX_WAKE_UP; \
97 G_ux_params.len = 0; \
98 os_ux(&G_ux_params); \
99 G_ux_params.len = os_sched_last_status(TASK_BOLOS_UX);
106 #define UX_BUTTON_PUSH_EVENT(seph_packet)
108 #define UX_BUTTON_PUSH_EVENT(seph_packet) ux_process_button_event(seph_packet)
116 #define UX_FINGER_EVENT(seph_packet) ux_process_finger_event(seph_packet)
118 #define UX_FINGER_EVENT(seph_packet)
125 #define UX_TICKER_EVENT(seph_packet, callback) ux_process_ticker_event()
131 #define UX_DEFAULT_EVENT() ux_process_default_event()
139 unsigned int ux_status;
143 #ifdef HAVE_BACKGROUND_IMG
144 SYSCALL PERMISSION(APPLICATION_FLAG_BOLOS_UX)
145 uint8_t *fetch_background_img(
bool allow_candidate);
146 SYSCALL PERMISSION(APPLICATION_FLAG_BOLOS_UX)
147 bolos_err_t delete_background_img(
void);
155 #if defined(HAVE_LANGUAGE_PACK)
157 void bolos_ux_select_language(
uint16_t language);
158 void bolos_ux_refresh_language(
void);
160 typedef struct ux_loc_language_pack_infos {
161 unsigned char available;
163 } UX_LOC_LANGUAGE_PACK_INFO;
166 SYSCALL PERMISSION(APPLICATION_FLAG_BOLOS_UX)
void list_language_packs(
167 UX_LOC_LANGUAGE_PACK_INFO *packs PLENGTH(NB_LANG *
sizeof(UX_LOC_LANGUAGE_PACK_INFO)));
168 SYSCALL PERMISSION(APPLICATION_FLAG_BOLOS_UX)
const LANGUAGE_PACK *get_language_pack(
169 unsigned int language);
const char * get_ux_loc_string(uint32_t index)
unsigned int button_same_mask_counter
asynchmodal_end_callback_t asynchmodal_end_callback
bolos_task_status_t exit_code
bool validate_pin_from_dashboard
BOLOS_UX_LOC_STRINGS UX_LOC_STRINGS_INDEX
void ux_process_default_event(void)
bolos_ux_params_t G_ux_params
void(* asynchmodal_end_callback_t)(unsigned int ux_status)
void ux_process_finger_event(uint8_t seph_packet[])
Process finger event.
struct ux_seph_s ux_seph_os_and_app_t
void io_seproxyhal_power_off(bool criticalBattery)
void ux_process_button_event(uint8_t seph_packet[])
void ux_process_ticker_event(void)
Process the ticker_event to the os ux handler. Ticker event callback is always called whatever the re...
ux_seph_os_and_app_t G_ux_os
void io_seproxyhal_request_mcu_status(void)