diff options
Diffstat (limited to 'fw')
-rw-r--r-- | fw/fe310/test/Makefile | 2 | ||||
-rw-r--r-- | fw/fe310/test/main.c | 10 | ||||
-rw-r--r-- | fw/fe310/test/test.c | 52 | ||||
-rw-r--r-- | fw/fe310/test/test.h | 2 |
4 files changed, 64 insertions, 2 deletions
diff --git a/fw/fe310/test/Makefile b/fw/fe310/test/Makefile index c5f68fb..8476db8 100644 --- a/fw/fe310/test/Makefile +++ b/fw/fe310/test/Makefile @@ -5,7 +5,7 @@ CRYPTO_DIR = ../../../crypto CFLAGS += -I.. -I../eos -I../bsp/include -I../bsp/drivers -I$(CRYPTO_DIR) LDFLAGS = $(CFLAGS) -L.. -Wl,--gc-sections -nostartfiles -nostdlib -Wl,--start-group -lc -lm -lgcc -leos -Wl,--end-group -T../bsp/default.lds -DEPS = main.o status.o cell_dev.o cell_pdp.o phone.o modem.o wifi.o cam.o test.o +DEPS = main.o status.o cell_dev.o cell_pdp.o phone.o modem.o wifi.o cam.o fs.o test.o TARGET = phone all: $(TARGET) diff --git a/fw/fe310/test/main.c b/fw/fe310/test/main.c index 367c3b5..844dedc 100644 --- a/fw/fe310/test/main.c +++ b/fw/fe310/test/main.c @@ -24,6 +24,7 @@ #include "modem.h" #include "wifi.h" #include "cam.h" +#include "fs.h" #include "test.h" void app_home_page(EVEWindow *window, EVEViewStack *stack) { @@ -61,12 +62,18 @@ void app_home_page(EVEWindow *window, EVEViewStack *stack) { { .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); + EVEForm *form = eve_form_create(window, stack, spec, 7, NULL, NULL, NULL); } int main() { @@ -80,6 +87,7 @@ int main() { app_wifi_init(); app_cell_dev_init(); app_cell_pdp_init(); + app_fs_init(); eos_evtq_loop(); } diff --git a/fw/fe310/test/test.c b/fw/fe310/test/test.c new file mode 100644 index 0000000..bc774d9 --- /dev/null +++ b/fw/fe310/test/test.c @@ -0,0 +1,52 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> + +#include <eos.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 <board.h> + +#include "test.h" + +#include <stdio.h> + +int app_test_uievt(EVEForm *form, uint16_t evt, void *param) { + int ret = 0; + + switch (evt) { + case EVE_UIEVT_PAGE_TOUCH: + printf("PAGE TOUCH\n"); + break; + + default: + ret = eve_form_uievt(form, evt, param); + break; + } + return ret; +} + +void app_test(EVEWindow *window, EVEViewStack *stack) { + EVEWidgetSpec spec[] = { + { + .widget.type = EVE_WIDGET_TYPE_SPACER, + .widget.g.h = 1, + }, + }; + EVEForm *form = eve_form_create(window, stack, spec, 1, app_test_uievt, NULL, app_test_close); +} + +void app_test_close(EVEForm *form) { + eve_form_destroy(form); +} diff --git a/fw/fe310/test/test.h b/fw/fe310/test/test.h new file mode 100644 index 0000000..daf1f1a --- /dev/null +++ b/fw/fe310/test/test.h @@ -0,0 +1,2 @@ +void app_test(EVEWindow *window, EVEViewStack *stack); +void app_test_close(EVEForm *form); |