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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <eos.h>
#include <timer.h>
#include <pwr.h>
#include <eve/eve.h>
#include <eve/eve_kbd.h>
#include <eve/eve_font.h>
#include <eve/screen/window.h>
#include <eve/screen/page.h>
#include <eve/screen/form.h>
#include <eve/widget/widgets.h>
#include <app/app_root.h>
#include <prci_driver.h>
#include "status.h"
#include "cell_dev.h"
#include "cell_pdp.h"
#include "phone.h"
#include "modem.h"
#include "wifi.h"
#include "cam.h"
// #include "fs.h"
#include "audio.h"
#include "test.h"
void app_home_page(EVEWindow *window, EVEViewStack *stack) {
EVEWidgetSpec spec[] = {
{
.widget.type = EVE_WIDGET_TYPE_PAGE,
.widget.g.w = APP_SCREEN_W,
.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.title = "WiFi",
.widget.spec.page.constructor = app_wifi
},
{
.widget.type = EVE_WIDGET_TYPE_PAGE,
.widget.g.w = APP_SCREEN_W,
.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.title = "Modem",
.widget.spec.page.constructor = app_modem
},
{
.widget.type = EVE_WIDGET_TYPE_PAGE,
.widget.g.w = APP_SCREEN_W,
.widget.spec.page.title = "Camera",
.widget.spec.page.constructor = app_cam
},
/*
{
.widget.type = EVE_WIDGET_TYPE_PAGE,
.widget.g.w = APP_SCREEN_W,
.widget.spec.page.title = "File system",
.widget.spec.page.constructor = app_fs
},
*/
{
.widget.type = EVE_WIDGET_TYPE_PAGE,
.widget.g.w = APP_SCREEN_W,
.widget.spec.page.title = "Test",
.widget.spec.page.constructor = app_test
},
};
EVEForm *form = eve_form_create(window, stack, spec, 6, NULL, NULL, NULL);
}
int main() {
eos_init();
printf("FREQ:%lu\n", PRCI_get_cpu_freq());
printf("\nREADY.\n");
app_root_init(app_home_page, 0x20);
app_status_init();
app_phone_init();
app_wifi_init();
app_cell_dev_init();
app_cell_pdp_init();
// app_fs_init();
audio_start();
eos_evtq_loop();
}
|