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/test/main.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 fw/fe310/test/main.c (limited to 'fw/fe310/test/main.c') diff --git a/fw/fe310/test/main.c b/fw/fe310/test/main.c new file mode 100644 index 0000000..095746d --- /dev/null +++ b/fw/fe310/test/main.c @@ -0,0 +1,83 @@ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include + +#include "status.h" +#include "phone.h" +#include "wifi.h" +#include "cell_data.h" +#include "modem.h" + +extern EVEFont *_app_font_default; + +void app_home_page(EVEWindow *window, EVEViewStack *stack) { + APPWidgetSpec spec[] = { + { + .widget.type = EVE_WIDGET_TYPE_PAGE, + .widget.g.w = APP_SCREEN_W, + .widget.spec.page.font = _app_font_default, + .widget.spec.page.title = "Phone", + .widget.spec.page.constructor = app_phone + }, + { + .widget.type = EVE_WIDGET_TYPE_PAGE, + .widget.g.w = APP_SCREEN_W, + .widget.spec.page.font = _app_font_default, + .widget.spec.page.title = "WiFi", + .widget.spec.page.constructor = app_wifi + }, + { + .widget.type = EVE_WIDGET_TYPE_PAGE, + .widget.g.w = APP_SCREEN_W, + .widget.spec.page.font = _app_font_default, + .widget.spec.page.title = "Cellular data", + .widget.spec.page.constructor = app_cell_data + }, + { + .widget.type = EVE_WIDGET_TYPE_PAGE, + .widget.g.w = APP_SCREEN_W, + .widget.spec.page.font = _app_font_default, + .widget.spec.page.title = "Modem", + .widget.spec.page.constructor = app_modem + }, + }; + + EVEForm *form = app_form_create(window, stack, spec, 4, NULL, NULL); +} + +int main() { + printf("\nREADY.\n"); + + eos_init(); + + app_root_init(app_home_page); + app_status_init(); + app_phone_init(); + app_wifi_init(); + app_cell_data_init(); + + eos_evtq_loop(); +} -- cgit v1.2.3