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/test/main.c | |
parent | d0a0fee0571be63f023f8f6a49a0b76b89871e56 (diff) |
added test app with voice, wifi/cellular data connectivity examples
Diffstat (limited to 'fw/fe310/test/main.c')
-rw-r--r-- | fw/fe310/test/main.c | 83 |
1 files changed, 83 insertions, 0 deletions
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 <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> + +#include <eos.h> +#include <event.h> +#include <spi.h> +#include <i2s.h> +#include <net.h> +#include <cell.h> + +#include <unicode.h> + +#include <eve/eve.h> +#include <eve/eve_kbd.h> + +#include <eve/screen/screen.h> +#include <eve/screen/window.h> +#include <eve/screen/view.h> +#include <eve/screen/page.h> +#include <eve/screen/form.h> + +#include <eve/widget/widgets.h> + +#include <app/root.h> + +#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(); +} |