Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
nbgl_flow.c File Reference

Implementation of flow management. More...

#include <string.h>
#include "nbgl_debug.h"
#include "nbgl_flow.h"
#include "glyphs.h"
#include "os_pic.h"
#include "ux.h"
Include dependency graph for nbgl_flow.c:

Go to the source code of this file.

Classes

struct  FlowContext_s

Macros

#define NB_MAX_LAYERS   3
 < Maximum number of layers for flow, cannot be greater than max number of step layers

Typedefs

typedef struct FlowContext_s FlowContext_t

Functions

static void actionCallback (nbgl_step_t stepCtx, nbgl_buttonEvent_t event)
static FlowContext_t * getFreeContext (bool modal)
static FlowContext_t * getContextFromStepCtx (nbgl_step_t stepCtx)
static void drawStep (FlowContext_t *ctx, nbgl_stepPosition_t pos, bool modal, const nbgl_icon_details_t *icon, const char *txt, const char *subTxt)
nbgl_flow_t nbgl_flowDraw (const nbgl_stepDesc_t *steps, uint8_t nbSteps, uint8_t initStep, bool loop, bool modal)
 draw the given flow, starting at the given step
void nbgl_flowRelease (nbgl_flow_t flow)
 release the given flow

Variables

static FlowContext_t contexts [NB_MAX_LAYERS]

Detailed Description

Implementation of flow management.

Definition in file nbgl_flow.c.

Macro Definition Documentation

◆ NB_MAX_LAYERS

#define NB_MAX_LAYERS   3

< Maximum number of layers for flow, cannot be greater than max number of step layers

Definition at line 27 of file nbgl_flow.c.

Typedef Documentation

◆ FlowContext_t

typedef struct FlowContext_s FlowContext_t

Function Documentation

◆ actionCallback()

void actionCallback ( nbgl_step_t stepCtx,
nbgl_buttonEvent_t event )
static

Definition at line 133 of file nbgl_flow.c.

◆ drawStep()

void drawStep ( FlowContext_t * ctx,
nbgl_stepPosition_t pos,
bool modal,
const nbgl_icon_details_t * icon,
const char * txt,
const char * subTxt )
static

Definition at line 103 of file nbgl_flow.c.

◆ getContextFromStepCtx()

FlowContext_t * getContextFromStepCtx ( nbgl_step_t stepCtx)
static

Definition at line 85 of file nbgl_flow.c.

◆ getFreeContext()

FlowContext_t * getFreeContext ( bool modal)
static

Definition at line 56 of file nbgl_flow.c.

◆ nbgl_flowDraw()

nbgl_flow_t nbgl_flowDraw ( const nbgl_stepDesc_t * steps,
uint8_t nbSteps,
uint8_t initStep,
bool loop,
bool modal )

draw the given flow, starting at the given step

Parameters
stepsarray of step descriptions
nbStepsnumber of steps in above array
initStepinit step in above array
loopif true, loop between last and first step, in both direction
modalif true, screens are modal
Returns
>= 0 if OK, < 0 otherwise

Definition at line 194 of file nbgl_flow.c.

◆ nbgl_flowRelease()

void nbgl_flowRelease ( nbgl_flow_t flow)

release the given flow

Parameters
flowflow to release

Definition at line 234 of file nbgl_flow.c.

Variable Documentation

◆ contexts

FlowContext_t contexts[NB_MAX_LAYERS]
static

Definition at line 44 of file nbgl_flow.c.