From 3050565531af2b3a09f2213893f10c64cf9fe43f Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Wed, 24 Feb 2021 19:50:20 +0100 Subject: added test app with voice, wifi/cellular data connectivity examples --- fw/fe310/eos/app/root.c | 7 ++++--- fw/fe310/eos/app/root.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'fw/fe310/eos/app') 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; ilabel) 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); -- cgit v1.2.3