Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
ux_nbgl.h File Reference
#include "os_math.h"
#include "os_ux.h"
#include "os_task.h"
#include "nbgl_screen.h"
#include "nbgl_touch.h"
#include "seproxyhal_protocol.h"
#include <string.h>
#include "glyphs.h"
Include dependency graph for ux_nbgl.h:

Go to the source code of this file.

Classes

struct  ux_state_s
 
struct  ux_seph_s
 

Macros

#define BUTTON_LEFT   SEPROXYHAL_TAG_BUTTON_PUSH_EVENT_LEFT
 
#define BUTTON_RIGHT   SEPROXYHAL_TAG_BUTTON_PUSH_EVENT_RIGHT
 
#define UX_INIT()   nbgl_objInit();
 
#define UX_WAKE_UP()
 
#define UX_BUTTON_PUSH_EVENT(seph_packet)
 
#define UX_FINGER_EVENT(seph_packet)   ux_process_finger_event(seph_packet)
 
#define UX_TICKER_EVENT(seph_packet, callback)   ux_process_ticker_event()
 
#define UX_DEFAULT_EVENT()   ux_process_default_event()
 

Typedefs

typedef struct ux_state_s ux_state_t
 
typedef struct ux_seph_s ux_seph_os_and_app_t
 

Functions

void ux_process_finger_event (uint8_t seph_packet[])
 Process finger event.
 
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 return code of the ux app.
 
void ux_process_default_event (void)
 

Variables

ux_state_t G_ux
 
bolos_ux_params_t G_ux_params
 
ux_seph_os_and_app_t G_ux_os
 

Macro Definition Documentation

◆ BUTTON_LEFT

#define BUTTON_LEFT   SEPROXYHAL_TAG_BUTTON_PUSH_EVENT_LEFT

Definition at line 34 of file ux_nbgl.h.

◆ BUTTON_RIGHT

#define BUTTON_RIGHT   SEPROXYHAL_TAG_BUTTON_PUSH_EVENT_RIGHT

Definition at line 35 of file ux_nbgl.h.

◆ UX_BUTTON_PUSH_EVENT

#define UX_BUTTON_PUSH_EVENT (   seph_packet)

forward the button push/release events to the os ux handler. if not used by it, it will be used by App controls

Definition at line 79 of file ux_nbgl.h.

◆ UX_DEFAULT_EVENT

#define UX_DEFAULT_EVENT ( )    ux_process_default_event()

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 104 of file ux_nbgl.h.

◆ UX_FINGER_EVENT

#define UX_FINGER_EVENT (   seph_packet)    ux_process_finger_event(seph_packet)

forward the finger_event to the os ux handler. if not used by it, it will be used by App controls

Definition at line 89 of file ux_nbgl.h.

◆ UX_INIT

#define UX_INIT ( )    nbgl_objInit();

Initialize the user experience structure

Definition at line 61 of file ux_nbgl.h.

◆ UX_TICKER_EVENT

#define UX_TICKER_EVENT (   seph_packet,
  callback 
)    ux_process_ticker_event()

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 98 of file ux_nbgl.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);
bolos_ux_params_t G_ux_params
Definition main.c:35

Request a wake up of the device (pin lock screen, ...) to display a new interface to the user. Wake up prevents power-off features. Therefore, security wise, this function shall only be called to request direct user interaction.

Definition at line 68 of file ux_nbgl.h.

Typedef Documentation

◆ ux_seph_os_and_app_t

◆ 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 40 of file ux_nbgl.h.

Function Documentation

◆ ux_process_button_event()

void ux_process_button_event ( uint8_t  seph_packet[])
extern

◆ ux_process_default_event()

void ux_process_default_event ( void  )
extern

Forwards the event to UX

Definition at line 147 of file ux.c.

◆ ux_process_finger_event()

void ux_process_finger_event ( uint8_t  seph_packet[])
extern

Process finger event.

Note
Application's finger event handler is called only if the ux app does not deny it (finger event caught by BOLOS UX page).
Parameters
seph_packetreceived SEPH packet

Definition at line 65 of file ux.c.

◆ ux_process_ticker_event()

void ux_process_ticker_event ( void  )
extern

Process the ticker_event to the os ux handler. Ticker event callback is always called whatever the return code of the ux app.

Note
Ticker event interval is assumed to be 100 ms.

Definition at line 111 of file ux.c.

Variable Documentation

◆ G_ux

ux_state_t G_ux
extern

Definition at line 34 of file main.c.

◆ G_ux_os

ux_seph_os_and_app_t G_ux_os
extern

◆ G_ux_params

bolos_ux_params_t G_ux_params
extern

Definition at line 35 of file main.c.