From d894eb01e9c979d0eb51f9495a7cf7281c213302 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sun, 4 Sep 2022 18:39:21 +0200 Subject: removed old test --- fw/fe310/test/app/Makefile | 15 -------- fw/fe310/test/app/app_root.c | 86 ------------------------------------------ fw/fe310/test/app/app_root.h | 12 ------ fw/fe310/test/app/app_status.c | 74 ------------------------------------ fw/fe310/test/app/app_status.h | 5 --- 5 files changed, 192 deletions(-) delete mode 100644 fw/fe310/test/app/Makefile delete mode 100644 fw/fe310/test/app/app_root.c delete mode 100644 fw/fe310/test/app/app_root.h delete mode 100644 fw/fe310/test/app/app_status.c delete mode 100644 fw/fe310/test/app/app_status.h (limited to 'fw/fe310/test/app') diff --git a/fw/fe310/test/app/Makefile b/fw/fe310/test/app/Makefile deleted file mode 100644 index fe0ba21..0000000 --- a/fw/fe310/test/app/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -include ../../common.mk - -obj = app_root.o app_status.o - - -%.o: %.c %.h - $(CC) $(CFLAGS) -c $< - -%.o: %.S - $(CC) $(CFLAGS) -c $< - -all: $(obj) - -clean: - rm -f *.o diff --git a/fw/fe310/test/app/app_root.c b/fw/fe310/test/app/app_root.c deleted file mode 100644 index 18ca284..0000000 --- a/fw/fe310/test/app/app_root.c +++ /dev/null @@ -1,86 +0,0 @@ -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include "app_status.h" -#include "app_root.h" - -#define KBD_X 0 -#define KBD_Y 629 -#define KBD_W 480 -#define KBD_H 225 - -static EVEKbd kbd; -static EVEFont font; -static EVEWindowRoot win_root; -static EVEWindowKbd win_kbd; -static EVEWindow win_status; -static EVEWindow win_main; -static EVEView view_status; -static EVEViewStack view_stack; - -EVEWindowRoot *app_root(void) { - return &win_root; -} - -void app_root_refresh(void) { - eve_spi_start(); - eve_window_root_draw(app_root()); - eve_spi_stop(); -} - -void app_root_init(eve_view_constructor_t home_page, int b) { - EVERect g; - - eve_spi_start(); - - if (b >= 0) eve_brightness(b); - - eve_font_init(&font, APP_FONT_HANDLE); - - g.x = 0; - g.y = 0; - g.w = APP_SCREEN_W; - g.h = APP_SCREEN_H; - eve_window_init_root(&win_root, &g, "root", &font); - - g.x = KBD_X; - g.y = KBD_Y; - g.w = KBD_W; - g.h = KBD_H; - eve_kbd_init(&kbd, &g, win_root.mem_next, &win_root.mem_next); - eve_window_init_kbd(&win_kbd, &g, &win_root, "kbd", &kbd); - - g.x = 0; - g.y = 0; - g.w = APP_SCREEN_W; - g.h = APP_STATUS_H; - eve_window_init(&win_status, &g, (EVEWindow *)&win_root, "status"); - eve_view_init(&view_status, &win_status, app_status_draw, app_status_touch, NULL, NULL); - - g.x = 0; - g.y = APP_STATUS_H; - g.w = APP_SCREEN_W; - g.h = APP_SCREEN_H - APP_STATUS_H; - eve_window_init(&win_main, &g, (EVEWindow *)&win_root, "main"); - - eve_view_stack_init(&view_stack); - eve_view_create(&win_main, &view_stack, home_page); - - eve_window_append(&win_status); - eve_window_append(&win_main); - - eve_window_root_draw(&win_root); - - eve_spi_stop(); - - eos_net_acquire_for_evt(EOS_EVT_EVE | EVE_ETYPE_INTR, 1); -} diff --git a/fw/fe310/test/app/app_root.h b/fw/fe310/test/app/app_root.h deleted file mode 100644 index 35f889f..0000000 --- a/fw/fe310/test/app/app_root.h +++ /dev/null @@ -1,12 +0,0 @@ -#include - -#define APP_SCREEN_W 480 -#define APP_SCREEN_H 854 -#define APP_STATUS_H 60 - -#define APP_FONT_HANDLE 31 - -EVEWindowRoot *app_root(void); -void app_root_refresh(void); - -void app_root_init(eve_view_constructor_t home_page, int b); diff --git a/fw/fe310/test/app/app_status.c b/fw/fe310/test/app/app_status.c deleted file mode 100644 index bbe906d..0000000 --- a/fw/fe310/test/app/app_status.c +++ /dev/null @@ -1,74 +0,0 @@ -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include "app_root.h" -#include "app_status.h" - -#include "../phone.h" - -static char status_msg[128]; - -int app_status_touch(EVEView *view, EVETouch *touch, uint16_t evt, uint8_t tag0) { - unsigned char state = 0; - int8_t touch_idx; - - // state = app_phone_state_get(); - touch_idx = eve_touch_get_idx(touch); - if (touch_idx != 0) return 0; - - evt = eve_touch_evt(touch, evt, tag0, view->tag, 2); - if (touch && (evt & EVE_TOUCH_ETYPE_POINT_UP)) { - if ((state == VOICE_STATE_RING) && (touch->eevt & EVE_TOUCH_EETYPE_TRACK_LEFT)) { - unsigned char *buf = eos_net_alloc(); - - buf[0] = EOS_CELL_MTYPE_VOICE | EOS_CELL_MTYPE_VOICE_ANSWER; - eos_net_send_async(EOS_NET_MTYPE_CELL, buf, 1, 0); - status_msg[0] = '\0'; - } - if ((state != VOICE_STATE_IDLE) && (touch->eevt & EVE_TOUCH_EETYPE_TRACK_RIGHT)) { - unsigned char *buf = eos_net_alloc(); - - buf[0] = EOS_CELL_MTYPE_VOICE | EOS_CELL_MTYPE_VOICE_HANGUP; - eos_net_send_async(EOS_NET_MTYPE_CELL, buf, 1, 0); - status_msg[0] = '\0'; - } - return 1; - } - return 0; -} - -uint8_t app_status_draw(EVEView *view, uint8_t tag0) { - uint8_t tag_opt = EVE_TOUCH_OPT_TRACK | EVE_TOUCH_OPT_TRACK_XY; - - tag0 = eve_view_clear(view, tag0, tag_opt); - - if (tag0 != EVE_NOTAG) { - eve_touch_set_opt(tag0, eve_touch_get_opt(tag0) | tag_opt); - eve_cmd_dl(TAG(tag0)); - tag0++; - } - - eve_cmd(CMD_TEXT, "hhhhs", 0, 0, 31, 0, status_msg); - - return tag0; -} - -void app_status_msg_set(char *msg, int refresh) { - strcpy(status_msg, msg); - - if (refresh) app_root_refresh(); -} diff --git a/fw/fe310/test/app/app_status.h b/fw/fe310/test/app/app_status.h deleted file mode 100644 index 262d29c..0000000 --- a/fw/fe310/test/app/app_status.h +++ /dev/null @@ -1,5 +0,0 @@ -#include - -int app_status_touch(EVEView *view, EVETouch *touch, uint16_t evt, uint8_t tag0); -uint8_t app_status_draw(EVEView *view, uint8_t tag0); -void app_status_msg_set(char *msg, int refresh); -- cgit v1.2.3