diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-02-24 19:50:20 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-02-24 19:50:20 +0100 |
commit | 3050565531af2b3a09f2213893f10c64cf9fe43f (patch) | |
tree | 689d10ca064dba4480a85b6ec14a4eb8305d5c89 /fw/fe310/eos/app | |
parent | d0a0fee0571be63f023f8f6a49a0b76b89871e56 (diff) |
added test app with voice, wifi/cellular data connectivity examples
Diffstat (limited to 'fw/fe310/eos/app')
-rw-r--r-- | fw/fe310/eos/app/root.c | 7 | ||||
-rw-r--r-- | fw/fe310/eos/app/root.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/fw/fe310/eos/app/root.c b/fw/fe310/eos/app/root.c index 6eb3fa6..a86b291 100644 --- a/fw/fe310/eos/app/root.c +++ b/fw/fe310/eos/app/root.c @@ -97,10 +97,11 @@ static void widgets_destroy(EVEWidget *widget, uint16_t widget_size) { for (i=0; i<widget_size; i++) { if (widget->label) eve_free(widget->label); eve_widget_destroy(widget); + widget = eve_widget_next(widget); } } -EVEForm *app_form_create(EVEWindow *window, EVEViewStack *stack, APPWidgetSpec spec[], uint16_t spec_size, eve_page_destructor_t destructor) { +EVEForm *app_form_create(EVEWindow *window, EVEViewStack *stack, APPWidgetSpec spec[], uint16_t spec_size, eve_form_action_t action, eve_form_destructor_t destructor) { EVEWidget *widgets; EVEWidget *widget; EVELabel *label; @@ -146,8 +147,8 @@ EVEForm *app_form_create(EVEWindow *window, EVEViewStack *stack, APPWidgetSpec s widget = eve_widget_next(widget); } - if (destructor == NULL) destructor = (eve_page_destructor_t)app_form_destroy; - eve_form_init(form, window, stack, widgets, spec_size, destructor); + if (destructor == NULL) destructor = app_form_destroy; + eve_form_init(form, window, stack, widgets, spec_size, action, destructor); return form; } diff --git a/fw/fe310/eos/app/root.h b/fw/fe310/eos/app/root.h index 1885515..2b6fc63 100644 --- a/fw/fe310/eos/app/root.h +++ b/fw/fe310/eos/app/root.h @@ -24,5 +24,5 @@ typedef struct APPWidgetSpec { EVEScreen *app_screen(void); void app_root_init(eve_view_constructor_t home_page); -EVEForm *app_form_create(EVEWindow *window, EVEViewStack *stack, APPWidgetSpec spec[], uint16_t spec_size, eve_page_destructor_t destructor); +EVEForm *app_form_create(EVEWindow *window, EVEViewStack *stack, APPWidgetSpec spec[], uint16_t spec_size, eve_form_action_t action, eve_form_destructor_t destructor); void app_form_destroy(EVEForm *form); |