Embedded SDK
Embedded SDK
Classes | Macros | Typedefs | Functions | Variables
ux_bagl.h File Reference
#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"
Include dependency graph for ux_bagl.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_FORWARD_EVENT_REDRAWCB(bypasspincheck, G_ux_params, G_ux, os_ux, os_sched_last_status, callback, redraw_cb, ignoring_app_if_ux_busy)
 
#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)
 

Typedefs

typedef struct bagl_element_e bagl_element_t
 
typedef const bagl_element_t *(* bagl_element_callback_t) (const bagl_element_t *element)
 
typedef struct ux_layout_strings_params_s ux_layout_strings_params_t
 
typedef struct ux_layout_icon_strings_params_s ux_layout_icon_strings_params_t
 
typedef unsigned int(* button_push_callback_t) (unsigned int button_mask, unsigned int button_mask_counter)
 
typedef unsigned int(* callback_int_t) (unsigned int)
 
typedef void(* asynchmodal_end_callback_t) (unsigned int ux_status)
 
typedef struct ux_stack_slot_s ux_stack_slot_t
 
typedef struct ux_state_s ux_state_t
 
typedef void(* ux_menu_callback_t) (unsigned int userid)
 
typedef struct ux_menu_entry_s ux_menu_entry_t
 
typedef const bagl_element_t *(* ux_menu_preprocessor_t) (const ux_menu_entry_t *, bagl_element_t *element)
 
typedef const ux_menu_entry_t *(* ux_menu_iterator_t) (unsigned int entry_idx)
 
typedef struct ux_menu_state_s ux_menu_state_t
 
typedef void(* ux_turner_callback_t) (void)
 
typedef struct ux_turner_step_s ux_turner_step_t
 
typedef struct ux_turner_state_s ux_turner_state_t
 
typedef struct ux_seph_s ux_seph_os_and_app_t
 

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_tux_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_tux_stack_display_element_callback (const bagl_element_t *element)
 
void io_seproxyhal_setup_ticker (unsigned int interval_ms)
 
void io_seproxyhal_request_mcu_status (void)
 
void io_seproxyhal_display_bitmap (int x, int y, unsigned int w, unsigned int h, unsigned int *color_index, unsigned int bit_per_pixel, unsigned char *bitmap)
 
void io_seproxyhal_power_off (bool criticalBattery)
 
void io_seproxyhal_se_reset (void)
 
void io_seproxyhal_disable_io (void)
 
void io_seproxyhal_backlight (unsigned int flags, unsigned int backlight_percentage)
 
void io_seproxyhal_display_icon (const bagl_component_t *icon_component, const bagl_icon_details_t *icon_details)
 
unsigned int io_seproxyhal_display_icon_header_and_colors (const bagl_component_t *icon_component, const bagl_icon_details_t *icon_details, unsigned int *icon_len)
 
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_tux_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
 

Macro Definition Documentation

◆ BUTTON_EVT_FAST

#define BUTTON_EVT_FAST   0x40000000UL

Definition at line 147 of file ux_bagl.h.

◆ BUTTON_EVT_RELEASED

#define BUTTON_EVT_RELEASED   0x80000000UL

Definition at line 148 of file ux_bagl.h.

◆ BUTTON_FAST_ACTION_CS

#define BUTTON_FAST_ACTION_CS   3

Definition at line 139 of file ux_bagl.h.

◆ BUTTON_FAST_THRESHOLD_CS

#define BUTTON_FAST_THRESHOLD_CS   8

Definition at line 136 of file ux_bagl.h.

◆ BUTTON_LEFT

#define BUTTON_LEFT   1

Definition at line 144 of file ux_bagl.h.

◆ BUTTON_RIGHT

#define BUTTON_RIGHT   2

Definition at line 145 of file ux_bagl.h.

◆ callback_interval_ms

#define callback_interval_ms   stack[0].ticker_interval

Definition at line 347 of file ux_bagl.h.

◆ COMPLIANCE_UX_160

#define COMPLIANCE_UX_160

Definition at line 34 of file ux_bagl.h.

◆ G_ux

#define G_ux   ux

Definition at line 345 of file ux_bagl.h.

◆ G_ux_params

#define G_ux_params   ux.params

Definition at line 346 of file ux_bagl.h.

◆ HAVE_UX_LEGACY

#define HAVE_UX_LEGACY

Definition at line 35 of file ux_bagl.h.

◆ STATIC_IF_NOT_INDEXED

#define STATIC_IF_NOT_INDEXED   static

Definition at line 74 of file ux_bagl.h.

◆ UX_BUTTON_PUSH_EVENT

#define UX_BUTTON_PUSH_EVENT (   seph_packet)
Value:
{ \
if (G_ux.stack[0].button_push_callback) { \
io_seproxyhal_button_push(G_ux.stack[0].button_push_callback, \
seph_packet[3] >> 1); \
} \
UX_CONTINUE_DISPLAY_APP({}); \
}, \
1);
#define UX_FORWARD_EVENT(callback, ignoring_app_if_ux_busy)
Definition: ux_bagl.h:548
#define G_ux
Definition: ux_bagl.h:345

Process button push events. Application's button event handler is called only if the ux app does not deny it (modal frame displayed).

Definition at line 607 of file ux_bagl.h.

◆ UX_CALLBACK_SET_INTERVAL

#define UX_CALLBACK_SET_INTERVAL (   ms)    G_ux.stack[0].ticker_value = ms;

Request a screen redisplay after the given milliseconds interval has passed. Interval is not repeated, it's a single shot callback. must be re-enabled (the JS way).

Definition at line 542 of file ux_bagl.h.

◆ UX_CONTINUE_DISPLAY_APP

#define UX_CONTINUE_DISPLAY_APP (   displayed_callback)
Value:
/* all items have been displayed */ \
if (G_ux.stack[0].element_index >= G_ux.stack[0].element_arrays[0].element_array_count \
&& !io_seproxyhal_spi_is_status_sent()) { \
displayed_callback \
}
#define UX_DISPLAY_NEXT_ELEMENT()
Definition: ux_bagl.h:400

Definition at line 558 of file ux_bagl.h.

◆ UX_DEFAULT_EVENT

#define UX_DEFAULT_EVENT ( )    UX_FORWARD_EVENT({ UX_CONTINUE_DISPLAY_APP({}); }, 0);

Forward the event, ignoring the UX return code, the event must therefore be either not processed or processed with extreme care by the application afterwards

Definition at line 650 of file ux_bagl.h.

◆ UX_DISPLAY

#define UX_DISPLAY (   elements_array,
  preprocessor 
)
Value:
G_ux.stack[0].element_arrays[0].element_array = elements_array; \
G_ux.stack[0].element_arrays[0].element_array_count \
= sizeof(elements_array) / sizeof(elements_array[0]); \
G_ux.stack[0].button_push_callback = elements_array##_button; \
G_ux.stack[0].screen_before_element_display_callback = preprocessor; \
UX_WAKE_UP(); \
UX_REDISPLAY();

Definition at line 517 of file ux_bagl.h.

◆ UX_DISPLAY_KEYBOARD

#define UX_DISPLAY_KEYBOARD (   callback)
Value:
G_ux_params.ux_id = BOLOS_UX_KEYBOARD; \
G_ux_params.len = 0; \
os_ux(&G_ux_params); \
G_ux_params.len = os_sched_last_status(TASK_BOLOS_UX);
#define G_ux_params
Definition: ux_bagl.h:346

Start displaying the system keyboard input to allow. keyboard entry ends when any ux call returns with an OK status.

Definition at line 656 of file ux_bagl.h.

◆ UX_DISPLAY_NEXT_ELEMENT

#define UX_DISPLAY_NEXT_ELEMENT ( )
Value:
while (G_ux.stack[0].element_arrays[0].element_array \
&& G_ux.stack[0].element_index < G_ux.stack[0].element_arrays[0].element_array_count \
&& !io_seproxyhal_spi_is_status_sent() \
&& (os_perso_isonboarded() != BOLOS_UX_OK \
|| os_global_pin_is_validated() == BOLOS_UX_OK)) { \
const bagl_element_t *element \
= &G_ux.stack[0].element_arrays[0].element_array[G_ux.stack[0].element_index]; \
if (!G_ux.stack[0].screen_before_element_display_callback \
|| (element = G_ux.stack[0].screen_before_element_display_callback(element))) { \
if ((unsigned int) element \
== 1) { /*backward compat with coding to avoid smashing everything*/ \
element \
= &G_ux.stack[0].element_arrays[0].element_array[G_ux.stack[0].element_index]; \
} \
io_seproxyhal_display(element); \
} \
G_ux.stack[0].element_index++; \
}

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

Definition at line 400 of file ux_bagl.h.

◆ UX_DISPLAY_REQUEST

#define UX_DISPLAY_REQUEST (   elements_array,
  preprocessor 
)
Value:
G_ux.stack[0].element_arrays[0].element_array = elements_array; \
G_ux.stack[0].element_arrays[0].element_array_count \
= sizeof(elements_array) / sizeof(elements_array[0]); \
G_ux.stack[0].button_push_callback = elements_array##_button; \
G_ux.stack[0].screen_before_element_display_callback = preprocessor; \
UX_WAKE_UP();

Request the given UX to be redisplayed without emitting a display status right now (to continue current operation, like transferring an USB reply)

Definition at line 530 of file ux_bagl.h.

◆ UX_DISPLAYED

#define UX_DISPLAYED ( )     (G_ux.stack[0].element_index >= G_ux.stack[0].element_arrays[0].element_array_count)

Deprecated version to be removed

Definition at line 575 of file ux_bagl.h.

◆ UX_DISPLAYED_EVENT

#define UX_DISPLAYED_EVENT (   displayed_callback)     UX_FORWARD_EVENT({ UX_CONTINUE_DISPLAY_APP(displayed_callback); }, 1)

Process display processed event (by the os_ux or by the application code)

Definition at line 569 of file ux_bagl.h.

◆ UX_FINGER_EVENT

#define UX_FINGER_EVENT (   seph_packet)

Definition at line 618 of file ux_bagl.h.

◆ UX_FORWARD_EVENT

#define UX_FORWARD_EVENT (   callback,
  ignoring_app_if_ux_busy 
)
Value:
G_io_asynch_ux_callback, \
os_ux, \
os_sched_last_status, \
callback, \
ignoring_app_if_ux_busy);
#define UX_FORWARD_EVENT_REDRAWCB(bypasspincheck, G_ux_params, G_ux, os_ux, os_sched_last_status, callback, redraw_cb, ignoring_app_if_ux_busy)
Definition: ux_bagl.h:459
#define UX_REDISPLAY()
Definition: ux_bagl.h:515

internal bolos ux event processing with callback in case event is to be processed by the application

Definition at line 548 of file ux_bagl.h.

◆ UX_FORWARD_EVENT_REDRAWCB

#define UX_FORWARD_EVENT_REDRAWCB (   bypasspincheck,
  G_ux_params,
  G_ux,
  os_ux,
  os_sched_last_status,
  callback,
  redraw_cb,
  ignoring_app_if_ux_busy 
)
Value:
G_ux_params.ux_id = BOLOS_UX_EVENT; \
G_ux_params.len = 0; \
os_ux(&G_ux_params); \
G_ux_params.len = os_sched_last_status(TASK_BOLOS_UX); \
if (G_ux_params.len == BOLOS_UX_REDRAW) { \
redraw_cb; \
} \
else if (!ignoring_app_if_ux_busy \
|| (G_ux_params.len != BOLOS_UX_IGNORE && G_ux_params.len != BOLOS_UX_CONTINUE)) { \
callback; \
}

internal bolos ux event processing with callback in case event is to be processed by the application

Definition at line 459 of file ux_bagl.h.

◆ UX_INIT

#define UX_INIT ( )
Value:
memset(&G_ux, 0, sizeof(G_ux)); \
ux_stack_push();

Definition at line 348 of file ux_bagl.h.

◆ UX_MENU_DISPLAY

#define UX_MENU_DISPLAY (   current_entry,
  menu_entries,
  menu_entry_preprocessor 
)     ux_menu_display(current_entry, menu_entries, menu_entry_preprocessor);

Definition at line 724 of file ux_bagl.h.

◆ UX_MENU_END

#define UX_MENU_END
Value:
{ \
NULL, NULL, 0, NULL, NULL, NULL, 0, 0 \
}

Definition at line 717 of file ux_bagl.h.

◆ UX_MENU_INIT

#define UX_MENU_INIT ( )    memset(&ux_menu, 0, sizeof(ux_menu));

Definition at line 722 of file ux_bagl.h.

◆ UX_MENU_UNCHANGED_ENTRY

#define UX_MENU_UNCHANGED_ENTRY   (-1UL)

Definition at line 728 of file ux_bagl.h.

◆ UX_REDISPLAY

#define UX_REDISPLAY ( )    UX_REDISPLAY_IDX(0)

Redisplay all elements of the screen

Definition at line 515 of file ux_bagl.h.

◆ UX_REDISPLAY_IDX

#define UX_REDISPLAY_IDX (   index)
Value:
io_seproxyhal_init_ux(); \
io_seproxyhal_init_button(); /*ensure to avoid release of a button from a nother screen to \
mess up with the redisplayed screen */ \
G_ux.stack[0].element_index = index; \
/* REDRAW is redisplay already, use os_ux return value to check */ \
G_ux_params.len = os_sched_last_status(TASK_BOLOS_UX); \
if (G_ux_params.len != BOLOS_UX_IGNORE && G_ux_params.len != BOLOS_UX_CONTINUE) { \
UX_DISPLAY_NEXT_ELEMENT(); \
}

Force redisplay of the screen from the given index in the screen's element array

Definition at line 502 of file ux_bagl.h.

◆ UX_REDISPLAY_REQUEST

#define UX_REDISPLAY_REQUEST ( )
Value:
io_seproxyhal_init_ux(); \
io_seproxyhal_init_button(); \
G_ux.stack[0].element_index = 0;

Redisplay request (no immediate display status sent)

Definition at line 494 of file ux_bagl.h.

◆ UX_STACK_SLOT_ARRAY_COUNT

#define UX_STACK_SLOT_ARRAY_COUNT   1

Definition at line 170 of file ux_bagl.h.

◆ UX_STACK_SLOT_COUNT

#define UX_STACK_SLOT_COUNT   1

Definition at line 166 of file ux_bagl.h.

◆ UX_TICKER_EVENT

#define UX_TICKER_EVENT (   seph_packet,
  callback 
)
Value:
{ \
unsigned int UX_ALLOWED \
= (G_ux_params.len != BOLOS_UX_IGNORE && G_ux_params.len != BOLOS_UX_CONTINUE); \
if (G_ux.stack[0].ticker_value) { \
G_ux.stack[0].ticker_value -= MIN(G_ux.stack[0].ticker_value, 100); \
if (!G_ux.stack[0].ticker_value) { \
if (!G_ux.stack[0].ticker_callback) { \
callback \
} \
else { \
G_ux.stack[0].ticker_value = G_ux.stack[0].ticker_interval; \
G_ux.stack[0].ticker_callback(0); \
} \
} \
} \
if (UX_ALLOWED) { \
UX_CONTINUE_DISPLAY_APP({}); \
} \
}, \
0);
#define MIN(x, y)
Definition: nbgl_types.h:79

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.

Definition at line 623 of file ux_bagl.h.

◆ UX_TURNER_DISPLAY

#define UX_TURNER_DISPLAY (   current_step,
  steps,
  steps_count,
  button_push_callback 
)     ux_turner_display(current_step, steps, steps_count, button_push_callback);

Definition at line 738 of file ux_bagl.h.

◆ UX_TURNER_INIT

#define UX_TURNER_INIT ( )    memset(&ux_turner, 0, sizeof(ux_turner));

Definition at line 736 of file ux_bagl.h.

◆ UX_TURNER_UNCHANGED_ENTRY

#define UX_TURNER_UNCHANGED_ENTRY   (-1UL)

Definition at line 742 of file ux_bagl.h.

◆ UX_WAIT_DISPLAYED

#define UX_WAIT_DISPLAYED ( )
Value:
while (!UX_DISPLAYED()) { \
/* We wait for the MCU event (should indicate display processed for a bagl element) */ \
io_seproxyhal_spi_recv(G_io_seproxyhal_spi_buffer, sizeof(G_io_seproxyhal_spi_buffer), 0); \
io_seproxyhal_handle_event(); \
UX_DISPLAY_NEXT_ELEMENT(); \
} \
io_seproxyhal_spi_recv(G_io_seproxyhal_spi_buffer, sizeof(G_io_seproxyhal_spi_buffer), 0); \
io_seproxyhal_handle_event(); \
/* We send a general status which indicates to the MCU that he can process any pending action \
* (i.e. here, display the whole screen) */ \
io_seproxyhal_general_status(); \
/* We wait for an ack of the MCU. */ \
io_seproxyhal_spi_recv(G_io_seproxyhal_spi_buffer, sizeof(G_io_seproxyhal_spi_buffer), 0);
uint8_t G_io_seproxyhal_spi_buffer[IO_SEPROXYHAL_BUFFER_SIZE_B]
Definition: io.c:33
#define UX_DISPLAYED()
Definition: ux_bagl.h:575

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.

Definition at line 588 of file ux_bagl.h.

◆ UX_WAKE_UP

#define UX_WAKE_UP ( )
Value:
G_ux_params.ux_id = BOLOS_UX_WAKE_UP; \
G_ux_params.len = 0; \
os_ux(&G_ux_params); \
G_ux_params.len = os_sched_last_status(TASK_BOLOS_UX);

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.

Definition at line 485 of file ux_bagl.h.

Typedef Documentation

◆ asynchmodal_end_callback_t

typedef void(* asynchmodal_end_callback_t) (unsigned int ux_status)

Definition at line 174 of file ux_bagl.h.

◆ bagl_element_callback_t

typedef const bagl_element_t*(* bagl_element_callback_t) (const bagl_element_t *element)

Definition at line 54 of file ux_bagl.h.

◆ bagl_element_t

Definition at line 1 of file ux_bagl.h.

◆ button_push_callback_t

typedef unsigned int(* button_push_callback_t) (unsigned int button_mask, unsigned int button_mask_counter)

Definition at line 142 of file ux_bagl.h.

◆ callback_int_t

typedef unsigned int(* callback_int_t) (unsigned int)

Definition at line 173 of file ux_bagl.h.

◆ ux_layout_icon_strings_params_t

◆ ux_layout_strings_params_t

◆ ux_menu_callback_t

typedef void(* ux_menu_callback_t) (unsigned int userid)

Definition at line 219 of file ux_bagl.h.

◆ ux_menu_entry_t

Definition at line 219 of file ux_bagl.h.

◆ ux_menu_iterator_t

typedef const ux_menu_entry_t*(* ux_menu_iterator_t) (unsigned int entry_idx)

Definition at line 243 of file ux_bagl.h.

◆ ux_menu_preprocessor_t

typedef const bagl_element_t*(* ux_menu_preprocessor_t) (const ux_menu_entry_t *, bagl_element_t *element)

Definition at line 241 of file ux_bagl.h.

◆ ux_menu_state_t

◆ ux_seph_os_and_app_t

◆ ux_stack_slot_t

Definition at line 174 of file ux_bagl.h.

◆ ux_state_t

typedef struct ux_state_s ux_state_t

Common structure for applications to perform asynchronous UX aside IO operations

Definition at line 174 of file ux_bagl.h.

◆ ux_turner_callback_t

typedef void(* ux_turner_callback_t) (void)

Definition at line 254 of file ux_bagl.h.

◆ ux_turner_state_t

◆ ux_turner_step_t

Function Documentation

◆ bagl_label_roundtrip_duration_ms()

unsigned int bagl_label_roundtrip_duration_ms ( const bagl_element_t e,
unsigned int  average_char_width 
)

◆ bagl_label_roundtrip_duration_ms_buf()

unsigned int bagl_label_roundtrip_duration_ms_buf ( const bagl_element_t e,
const char *  str,
unsigned int  average_char_width 
)

◆ io_seproxyhal_backlight()

void io_seproxyhal_backlight ( unsigned int  flags,
unsigned int  backlight_percentage 
)

◆ io_seproxyhal_button_push()

void io_seproxyhal_button_push ( button_push_callback_t  button_push_callback,
unsigned int  new_button_mask 
)

◆ io_seproxyhal_disable_io()

void io_seproxyhal_disable_io ( void  )

◆ io_seproxyhal_display()

void io_seproxyhal_display ( const bagl_element_t element)

◆ io_seproxyhal_display_bitmap()

void io_seproxyhal_display_bitmap ( int  x,
int  y,
unsigned int  w,
unsigned int  h,
unsigned int *  color_index,
unsigned int  bit_per_pixel,
unsigned char *  bitmap 
)

Helper function to order the MCU to display the given bitmap with the given color index, a table of size: (1<<bit_per_pixel) with little endian encoded colors. Deprecated

◆ io_seproxyhal_display_default()

void io_seproxyhal_display_default ( const bagl_element_t element)

◆ io_seproxyhal_display_icon()

void io_seproxyhal_display_icon ( const bagl_component_t *  icon_component,
const bagl_icon_details_t *  icon_details 
)

Helper function to send the given bitmap splitting into multiple DISPLAY_RAW packet as the bitmap is not meant to fit in a single SEPROXYHAL packet.

◆ io_seproxyhal_display_icon_header_and_colors()

unsigned int io_seproxyhal_display_icon_header_and_colors ( const bagl_component_t *  icon_component,
const bagl_icon_details_t *  icon_details,
unsigned int *  icon_len 
)

Helper method on the Blue to output icon header to the MCU and allow for bitmap transformation

◆ io_seproxyhal_power_off()

void io_seproxyhal_power_off ( bool  criticalBattery)

◆ io_seproxyhal_request_mcu_status()

void io_seproxyhal_request_mcu_status ( void  )

◆ io_seproxyhal_se_reset()

void io_seproxyhal_se_reset ( void  )

◆ io_seproxyhal_setup_ticker()

void io_seproxyhal_setup_ticker ( unsigned int  interval_ms)

Setup the TICKER_EVENT interval. Application shall not use this entry point as it's the main ticking source. Use the ::UX_SET_INTERVAL_MS instead.

◆ io_seproxyhal_touch()

void io_seproxyhal_touch ( const bagl_element_t elements,
unsigned short  element_count,
unsigned short  x,
unsigned short  y,
unsigned char  event_kind 
)

◆ io_seproxyhal_touch_callback()

void io_seproxyhal_touch_callback ( const bagl_element_t element,
unsigned char  event 
)

◆ io_seproxyhal_touch_element_callback()

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 
)

◆ ux_layout_strings_prepro()

const bagl_element_t* ux_layout_strings_prepro ( const bagl_element_t element)

Common strings prepro tosave space

◆ ux_menu_display()

void ux_menu_display ( unsigned int  current_entry,
const ux_menu_entry_t menu_entries,
ux_menu_preprocessor_t  menu_entry_preprocessor 
)

◆ ux_menu_element_preprocessor()

const bagl_element_t* ux_menu_element_preprocessor ( const bagl_element_t element)

◆ ux_menu_elements_button()

unsigned int ux_menu_elements_button ( unsigned int  button_mask,
unsigned int  button_mask_counter 
)

◆ ux_stack_al_display_next_element()

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

Definition at line 297 of file ux_stack.c.

◆ ux_stack_display()

void ux_stack_display ( unsigned int  stack_slot)

Definition at line 331 of file ux_stack.c.

◆ ux_stack_display_element_callback()

const bagl_element_t* ux_stack_display_element_callback ( const bagl_element_t element)

Definition at line 206 of file ux_stack.c.

◆ ux_stack_init()

void ux_stack_init ( unsigned int  stack_slot)

Definition at line 171 of file ux_stack.c.

◆ ux_stack_insert()

void ux_stack_insert ( unsigned int  stack_slot)

Definition at line 111 of file ux_stack.c.

◆ ux_stack_is_element_array_present()

unsigned int ux_stack_is_element_array_present ( const bagl_element_t element_array)

Definition at line 29 of file ux_stack.c.

◆ ux_stack_pop()

unsigned int ux_stack_pop ( void  )

Definition at line 59 of file ux_stack.c.

◆ ux_stack_push()

unsigned int ux_stack_push ( void  )

Definition at line 45 of file ux_stack.c.

◆ ux_stack_redisplay()

void ux_stack_redisplay ( void  )

Definition at line 89 of file ux_stack.c.

◆ ux_stack_remove()

void ux_stack_remove ( unsigned int  stack_slot)

Definition at line 140 of file ux_stack.c.

◆ ux_turner_display()

void ux_turner_display ( unsigned int  current_step,
const ux_turner_step_t steps,
unsigned int  steps_count,
button_push_callback_t  button_callback 
)

◆ ux_turner_ticker()

void ux_turner_ticker ( unsigned int  elpased_ms)

Variable Documentation

◆ G_ux

ux_state_t G_ux
extern

Definition at line 32 of file main.c.

◆ G_ux_os

ux_seph_os_and_app_t G_ux_os
extern

◆ ux_menu

ux_menu_state_t ux_menu
extern

◆ ux_turner

ux_turner_state_t ux_turner
extern