|
Embedded SDK
Embedded SDK
|
#include "bolos_target.h"#include "lcx_ecfp.h"#include "os_math.h"#include "os_ux.h"#include "os_task.h"#include "os_screen.h"#include "ux_layouts.h"#include "ux_flow_engine.h"#include "bagl.h"#include <string.h>#include "glyphs.h"
Go to the source code of this file.
Classes | |
| struct | bagl_element_e |
| struct | ux_layout_strings_params_s |
| struct | ux_layout_icon_strings_params_s |
| struct | ux_menu_entry_s |
| struct | ux_menu_state_s |
| struct | ux_turner_step_s |
| struct | ux_turner_state_s |
| struct | ux_stack_slot_s |
| struct | ux_state_s |
| struct | ux_seph_s |
Macros | |
| #define | COMPLIANCE_UX_160 |
| #define | HAVE_UX_LEGACY |
| #define | STATIC_IF_NOT_INDEXED static |
| #define | BUTTON_FAST_THRESHOLD_CS 8 |
| #define | BUTTON_FAST_ACTION_CS 3 |
| #define | BUTTON_LEFT 1 |
| #define | BUTTON_RIGHT 2 |
| #define | BUTTON_EVT_FAST 0x40000000UL |
| #define | BUTTON_EVT_RELEASED 0x80000000UL |
| #define | UX_STACK_SLOT_COUNT 1 |
| #define | UX_STACK_SLOT_ARRAY_COUNT 1 |
| #define | G_ux ux |
| #define | G_ux_params ux.params |
| #define | callback_interval_ms stack[0].ticker_interval |
| #define | UX_INIT() |
| #define | UX_DISPLAY_NEXT_ELEMENT() |
| #define | UX_WAKE_UP() |
| #define | UX_REDISPLAY_REQUEST() |
| #define | UX_REDISPLAY_IDX(index) |
| #define | UX_REDISPLAY() UX_REDISPLAY_IDX(0) |
| #define | UX_DISPLAY(elements_array, preprocessor) |
| #define | UX_DISPLAY_REQUEST(elements_array, preprocessor) |
| #define | UX_CALLBACK_SET_INTERVAL(ms) G_ux.stack[0].ticker_value = ms; |
| #define | UX_FORWARD_EVENT(callback, ignoring_app_if_ux_busy) |
| #define | UX_CONTINUE_DISPLAY_APP(displayed_callback) |
| #define | UX_DISPLAYED_EVENT(displayed_callback) UX_FORWARD_EVENT({ UX_CONTINUE_DISPLAY_APP(displayed_callback); }, 1) |
| #define | UX_DISPLAYED() (G_ux.stack[0].element_index >= G_ux.stack[0].element_arrays[0].element_array_count) |
| #define | UX_WAIT_DISPLAYED() |
| #define | UX_BUTTON_PUSH_EVENT(seph_packet) |
| #define | UX_FINGER_EVENT(seph_packet) |
| #define | UX_TICKER_EVENT(seph_packet, callback) |
| #define | UX_DEFAULT_EVENT() UX_FORWARD_EVENT({ UX_CONTINUE_DISPLAY_APP({}); }, 0); |
| #define | UX_DISPLAY_KEYBOARD(callback) |
| #define | UX_MENU_END |
| #define | UX_MENU_INIT() memset(&ux_menu, 0, sizeof(ux_menu)); |
| #define | UX_MENU_DISPLAY(current_entry, menu_entries, menu_entry_preprocessor) ux_menu_display(current_entry, menu_entries, menu_entry_preprocessor); |
| #define | UX_MENU_UNCHANGED_ENTRY (-1UL) |
| #define | UX_TURNER_INIT() memset(&ux_turner, 0, sizeof(ux_turner)); |
| #define | UX_TURNER_DISPLAY(current_step, steps, steps_count, button_push_callback) ux_turner_display(current_step, steps, steps_count, button_push_callback); |
| #define | UX_TURNER_UNCHANGED_ENTRY (-1UL) |
Functions | |
| void | io_seproxyhal_touch (const bagl_element_t *elements, unsigned short element_count, unsigned short x, unsigned short y, unsigned char event_kind) |
| void | io_seproxyhal_touch_element_callback (const bagl_element_t *elements, unsigned short element_count, unsigned short x, unsigned short y, unsigned char event_kind, bagl_element_callback_t before_display) |
| void | io_seproxyhal_touch_callback (const bagl_element_t *element, unsigned char event) |
| const bagl_element_t * | ux_layout_strings_prepro (const bagl_element_t *element) |
| void | io_seproxyhal_button_push (button_push_callback_t button_push_callback, unsigned int new_button_mask) |
| void | io_seproxyhal_display (const bagl_element_t *element) |
| unsigned int | bagl_label_roundtrip_duration_ms (const bagl_element_t *e, unsigned int average_char_width) |
| unsigned int | bagl_label_roundtrip_duration_ms_buf (const bagl_element_t *e, const char *str, unsigned int average_char_width) |
| void | io_seproxyhal_display_default (const bagl_element_t *element) |
| unsigned int | ux_stack_is_element_array_present (const bagl_element_t *element_array) |
| unsigned int | ux_stack_push (void) |
| unsigned int | ux_stack_pop (void) |
| void | ux_stack_insert (unsigned int stack_slot) |
| void | ux_stack_remove (unsigned int stack_slot) |
| void | ux_stack_init (unsigned int stack_slot) |
| void | ux_stack_display (unsigned int stack_slot) |
| void | ux_stack_al_display_next_element (unsigned int stack_slot) |
| void | ux_stack_redisplay (void) |
| const bagl_element_t * | ux_stack_display_element_callback (const bagl_element_t *element) |
| void | ux_stack_display_elements (ux_stack_slot_t *slot) |
| void | ux_menu_display (unsigned int current_entry, const ux_menu_entry_t *menu_entries, ux_menu_preprocessor_t menu_entry_preprocessor) |
| const bagl_element_t * | ux_menu_element_preprocessor (const bagl_element_t *element) |
| unsigned int | ux_menu_elements_button (unsigned int button_mask, unsigned int button_mask_counter) |
| void | ux_turner_display (unsigned int current_step, const ux_turner_step_t *steps, unsigned int steps_count, button_push_callback_t button_callback) |
| void | ux_turner_ticker (unsigned int elpased_ms) |
Variables | |
| ux_state_t | G_ux |
| ux_seph_os_and_app_t | G_ux_os |
| ux_menu_state_t | ux_menu |
| ux_turner_state_t | ux_turner |
| #define UX_BUTTON_PUSH_EVENT | ( | seph_packet | ) |
Process button push events. Application's button event handler is called only if the ux app does not deny it (modal frame displayed).
| #define UX_CALLBACK_SET_INTERVAL | ( | ms | ) | G_ux.stack[0].ticker_value = ms; |
| #define UX_CONTINUE_DISPLAY_APP | ( | displayed_callback | ) |
| #define UX_DEFAULT_EVENT | ( | ) | UX_FORWARD_EVENT({ UX_CONTINUE_DISPLAY_APP({}); }, 0); |
| #define UX_DISPLAY | ( | elements_array, | |
| preprocessor | |||
| ) |
| #define UX_DISPLAY_KEYBOARD | ( | callback | ) |
Start displaying the system keyboard input to allow. keyboard entry ends when any ux call returns with an OK status.
| #define UX_DISPLAY_NEXT_ELEMENT | ( | ) |
Request displaying the next element in the UX structure. Take into account if a seproxyhal status has already been issued. Take into account if the next element is allowed/denied for display by the registered preprocessor
| #define UX_DISPLAY_REQUEST | ( | elements_array, | |
| preprocessor | |||
| ) |
Request the given UX to be redisplayed without emitting a display status right now (to continue current operation, like transferring an USB reply)
| #define UX_DISPLAYED | ( | ) | (G_ux.stack[0].element_index >= G_ux.stack[0].element_arrays[0].element_array_count) |
| #define UX_DISPLAYED_EVENT | ( | displayed_callback | ) | UX_FORWARD_EVENT({ UX_CONTINUE_DISPLAY_APP(displayed_callback); }, 1) |
| #define UX_FORWARD_EVENT | ( | callback, | |
| ignoring_app_if_ux_busy | |||
| ) |
internal bolos ux event processing with callback in case event is to be processed by the application
| #define UX_INIT | ( | ) |
| #define UX_MENU_DISPLAY | ( | current_entry, | |
| menu_entries, | |||
| menu_entry_preprocessor | |||
| ) | ux_menu_display(current_entry, menu_entries, menu_entry_preprocessor); |
| #define UX_MENU_END |
| #define UX_REDISPLAY | ( | ) | UX_REDISPLAY_IDX(0) |
| #define UX_REDISPLAY_IDX | ( | index | ) |
Force redisplay of the screen from the given index in the screen's element array
| #define UX_REDISPLAY_REQUEST | ( | ) |
| #define UX_TICKER_EVENT | ( | seph_packet, | |
| callback | |||
| ) |
forward the ticker_event to the os ux handler. Ticker event callback is always called whatever the return code of the ux app. Ticker event interval is assumed to be 100 ms.
| #define UX_TURNER_DISPLAY | ( | current_step, | |
| steps, | |||
| steps_count, | |||
| button_push_callback | |||
| ) | ux_turner_display(current_step, steps, steps_count, button_push_callback); |
| #define UX_WAIT_DISPLAYED | ( | ) |
Macro to process sequentially display a screen. The call finishes when the UX is completely displayed, and the state of the MCU <-> SE exchanges is the same as before this macro call.
| #define UX_WAKE_UP | ( | ) |
Request a wake up of the device (backlight, pin lock screen, ...) to display a new interface to the user. Wake up prevent both autolock and power off features. Therefore, security wise, this function shall only be called to request direct user interaction.
| typedef const bagl_element_t *(* bagl_element_callback_t) (const bagl_element_t *element) |
| typedef struct bagl_element_e bagl_element_t |
| typedef unsigned int(* button_push_callback_t) (unsigned int button_mask, unsigned int button_mask_counter) |
| typedef struct ux_layout_icon_strings_params_s ux_layout_icon_strings_params_t |
| typedef struct ux_layout_strings_params_s ux_layout_strings_params_t |
| typedef struct ux_menu_entry_s ux_menu_entry_t |
| typedef const ux_menu_entry_t *(* ux_menu_iterator_t) (unsigned int entry_idx) |
| typedef const bagl_element_t *(* ux_menu_preprocessor_t) (const ux_menu_entry_t *, bagl_element_t *element) |
| typedef struct ux_menu_state_s ux_menu_state_t |
| typedef struct ux_seph_s ux_seph_os_and_app_t |
| typedef struct ux_stack_slot_s ux_stack_slot_t |
| typedef struct ux_state_s ux_state_t |
| typedef struct ux_turner_state_s ux_turner_state_t |
| typedef struct ux_turner_step_s ux_turner_step_t |
| unsigned int bagl_label_roundtrip_duration_ms | ( | const bagl_element_t * | e, |
| unsigned int | average_char_width | ||
| ) |
| unsigned int bagl_label_roundtrip_duration_ms_buf | ( | const bagl_element_t * | e, |
| const char * | str, | ||
| unsigned int | average_char_width | ||
| ) |
| void io_seproxyhal_button_push | ( | button_push_callback_t | button_push_callback, |
| unsigned int | new_button_mask | ||
| ) |
| void io_seproxyhal_display | ( | const bagl_element_t * | element | ) |
| void io_seproxyhal_display_default | ( | const bagl_element_t * | element | ) |
| void io_seproxyhal_touch | ( | const bagl_element_t * | elements, |
| unsigned short | element_count, | ||
| unsigned short | x, | ||
| unsigned short | y, | ||
| unsigned char | event_kind | ||
| ) |
| void io_seproxyhal_touch_callback | ( | const bagl_element_t * | element, |
| unsigned char | event | ||
| ) |
| void io_seproxyhal_touch_element_callback | ( | const bagl_element_t * | elements, |
| unsigned short | element_count, | ||
| unsigned short | x, | ||
| unsigned short | y, | ||
| unsigned char | event_kind, | ||
| bagl_element_callback_t | before_display | ||
| ) |
| const bagl_element_t * ux_layout_strings_prepro | ( | const bagl_element_t * | element | ) |
Common strings prepro tosave space
| void ux_menu_display | ( | unsigned int | current_entry, |
| const ux_menu_entry_t * | menu_entries, | ||
| ux_menu_preprocessor_t | menu_entry_preprocessor | ||
| ) |
| const bagl_element_t * ux_menu_element_preprocessor | ( | const bagl_element_t * | element | ) |
| unsigned int ux_menu_elements_button | ( | unsigned int | button_mask, |
| unsigned int | button_mask_counter | ||
| ) |
| void ux_stack_al_display_next_element | ( | unsigned int | stack_slot | ) |
Function to be implemented by the UX manager (to allow specific callback and processing of the target) The next displayable element of the given stack slot must be displayed
| void ux_stack_display | ( | unsigned int | stack_slot | ) |
Definition at line 288 of file ux_stack.c.
| const bagl_element_t * ux_stack_display_element_callback | ( | const bagl_element_t * | element | ) |
Definition at line 202 of file ux_stack.c.
| void ux_stack_display_elements | ( | ux_stack_slot_t * | slot | ) |
Definition at line 221 of file ux_stack.c.
| void ux_stack_init | ( | unsigned int | stack_slot | ) |
Definition at line 171 of file ux_stack.c.
| void ux_stack_insert | ( | unsigned int | stack_slot | ) |
Definition at line 111 of file ux_stack.c.
| unsigned int ux_stack_is_element_array_present | ( | const bagl_element_t * | element_array | ) |
Definition at line 29 of file ux_stack.c.
| unsigned int ux_stack_pop | ( | void | ) |
Definition at line 59 of file ux_stack.c.
| unsigned int ux_stack_push | ( | void | ) |
Definition at line 45 of file ux_stack.c.
| void ux_stack_redisplay | ( | void | ) |
Definition at line 89 of file ux_stack.c.
| void ux_stack_remove | ( | unsigned int | stack_slot | ) |
Definition at line 140 of file ux_stack.c.
| void ux_turner_display | ( | unsigned int | current_step, |
| const ux_turner_step_t * | steps, | ||
| unsigned int | steps_count, | ||
| button_push_callback_t | button_callback | ||
| ) |
| void ux_turner_ticker | ( | unsigned int | elpased_ms | ) |
|
extern |
|
extern |
|
extern |
|
extern |