summaryrefslogtreecommitdiff
path: root/fw/fe310/test/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/test/main.c')
-rw-r--r--fw/fe310/test/main.c52
1 files changed, 27 insertions, 25 deletions
diff --git a/fw/fe310/test/main.c b/fw/fe310/test/main.c
index 2fc1a04..f292ecf 100644
--- a/fw/fe310/test/main.c
+++ b/fw/fe310/test/main.c
@@ -3,9 +3,12 @@
#include <unistd.h>
#include <string.h>
+#include <prci_driver.h>
+
#include <eos.h>
-#include <timer.h>
-#include <pwr.h>
+#include <soc/timer.h>
+#include <soc/pwr.h>
+#include <dev/eve.h>
#include <eve/eve.h>
#include <eve/eve_kbd.h>
@@ -15,10 +18,6 @@
#include <eve/screen/page.h>
#include <eve/screen/form.h>
-#include <eve/widget/widgets.h>
-
-#include <prci_driver.h>
-
#include "app/app_root.h"
#include "cell_dev.h"
@@ -30,57 +29,57 @@
#include "fs.h"
#include "test.h"
-const uint32_t _eos_touch_matrix[6] = {0xf7ac,0x440,0x3e704,0xfffff718,0x108a3,0xfff76d42};
+static const uint32_t touch_matrix[6] = {0xf7ac,0x440,0x3e704,0xfffff718,0x108a3,0xfff76d42};
void app_home_page(EVEWindow *window, EVEViewStack *stack) {
- EVEWidgetSpec spec[] = {
+ EVEFormSpec 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.tspec.page.title = "Phone",
+ .widget.tspec.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.tspec.page.title = "WiFi",
+ .widget.tspec.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.tspec.page.title = "Cellular data",
+ .widget.tspec.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.tspec.page.title = "Modem",
+ .widget.tspec.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.tspec.page.title = "Camera",
+ .widget.tspec.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.tspec.page.title = "File system",
+ .widget.tspec.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
+ .widget.tspec.page.title = "Test",
+ .widget.tspec.page.constructor = app_test
},
};
- EVEForm *form = eve_form_create(window, stack, spec, 2, NULL, NULL, NULL);
+ EVEForm *form = eve_form_create(window, stack, spec, 1, NULL, NULL, NULL);
}
void print_mem(void);
@@ -88,16 +87,19 @@ void print_mem(void);
int main() {
eos_init();
// eos_run_once();
+ eos_eve_set_touch_matrix(touch_matrix);
printf("FREQ:%lu\n", PRCI_get_cpu_freq());
printf("\nREADY.\n");
- app_root_init(app_home_page, 0x10);
+ app_root_init(app_home_page, 0x20);
+ /*
app_phone_init();
app_wifi_init();
app_cell_dev_init();
app_cell_pdp_init();
app_fs_init();
+ */
// audio_start();
// app_ecp_init();