summaryrefslogtreecommitdiff
path: root/fw/fe310/test/main.c
blob: 6801b97ffa001128f47b2de0e4799c29d127254f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#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 "cell_dev.h"
#include "cell_pdp.h"
#include "phone.h"
#include "modem.h"
#include "wifi.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_pdp
        },
        {
            .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_pdp_init();

    eos_evtq_loop();
}