diff options
Diffstat (limited to 'fw/fe310/test')
-rw-r--r-- | fw/fe310/test/cell_pdp.c | 14 | ||||
-rw-r--r-- | fw/fe310/test/main.c | 9 | ||||
-rw-r--r-- | fw/fe310/test/modem.c | 1 | ||||
-rw-r--r-- | fw/fe310/test/phone.c | 13 | ||||
-rw-r--r-- | fw/fe310/test/status.c | 3 | ||||
-rw-r--r-- | fw/fe310/test/wifi.c | 15 |
6 files changed, 12 insertions, 43 deletions
diff --git a/fw/fe310/test/cell_pdp.c b/fw/fe310/test/cell_pdp.c index 955b42e..43c8579 100644 --- a/fw/fe310/test/cell_pdp.c +++ b/fw/fe310/test/cell_pdp.c @@ -14,6 +14,7 @@ #include <eve/eve.h> #include <eve/eve_kbd.h> +#include <eve/eve_font.h> #include <eve/screen/screen.h> #include <eve/screen/window.h> @@ -28,8 +29,6 @@ #include "status.h" #include "cell_pdp.h" -extern EVEFont *_app_font_default; - static void cell_pdp_connect(char *apn, char *user, char *pass) { unsigned char *buffer, *p; @@ -72,35 +71,26 @@ static void cell_pdp_handler(unsigned char type, unsigned char *buffer, uint16_t } void app_cell_pdp(EVEWindow *window, EVEViewStack *stack) { - APPWidgetSpec spec[] = { + EVEWidgetSpec spec[] = { { .label.g.w = APP_SCREEN_W / 3, - .label.font = _app_font_default, .label.title = "APN:", .widget.type = EVE_WIDGET_TYPE_STR, - .widget.g.w = APP_SCREEN_W - APP_SCREEN_W / 3, - .widget.spec.str.font = _app_font_default, .widget.spec.str.str_size = 128, }, { .label.g.w = APP_SCREEN_W / 3, - .label.font = _app_font_default, .label.title = "User:", .widget.type = EVE_WIDGET_TYPE_STR, - .widget.g.w = APP_SCREEN_W - APP_SCREEN_W / 3, - .widget.spec.str.font = _app_font_default, .widget.spec.str.str_size = 128, }, { .label.g.w = APP_SCREEN_W / 3, - .label.font = _app_font_default, .label.title = "Pass:", .widget.type = EVE_WIDGET_TYPE_STR, - .widget.g.w = APP_SCREEN_W - APP_SCREEN_W / 3, - .widget.spec.str.font = _app_font_default, .widget.spec.str.str_size = 128, }, }; diff --git a/fw/fe310/test/main.c b/fw/fe310/test/main.c index 7516fe8..934995c 100644 --- a/fw/fe310/test/main.c +++ b/fw/fe310/test/main.c @@ -14,6 +14,7 @@ #include <eve/eve.h> #include <eve/eve_kbd.h> +#include <eve/eve_font.h> #include <eve/screen/screen.h> #include <eve/screen/window.h> @@ -32,35 +33,29 @@ #include "modem.h" #include "wifi.h" -extern EVEFont *_app_font_default; - void app_home_page(EVEWindow *window, EVEViewStack *stack) { - APPWidgetSpec spec[] = { + EVEWidgetSpec 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 }, diff --git a/fw/fe310/test/modem.c b/fw/fe310/test/modem.c index 2a2ee7c..4ed7c81 100644 --- a/fw/fe310/test/modem.c +++ b/fw/fe310/test/modem.c @@ -15,6 +15,7 @@ #include <eve/eve.h> #include <eve/eve_kbd.h> #include <eve/eve_text.h> +#include <eve/eve_font.h> #include <eve/screen/screen.h> #include <eve/screen/window.h> diff --git a/fw/fe310/test/phone.c b/fw/fe310/test/phone.c index 2832fc4..b3a08b1 100644 --- a/fw/fe310/test/phone.c +++ b/fw/fe310/test/phone.c @@ -14,6 +14,7 @@ #include <eve/eve.h> #include <eve/eve_kbd.h> +#include <eve/eve_font.h> #include <eve/screen/screen.h> #include <eve/screen/window.h> @@ -28,8 +29,6 @@ #include "status.h" #include "phone.h" -extern EVEFont *_app_font_default; - #define ABUF_SIZE 512 #define MIC_WM 128 @@ -88,17 +87,11 @@ static void cell_voice_handler(unsigned char type, unsigned char *buffer, uint16 } void app_phone(EVEWindow *window, EVEViewStack *stack) { - char *title = "Phone:"; - uint16_t w = eve_font_str_w(_app_font_default, title) + 10; - APPWidgetSpec spec[] = { + EVEWidgetSpec spec[] = { { - .label.g.w = w, - .label.font = _app_font_default, - .label.title = title, + .label.title = "Phone:", .widget.type = EVE_WIDGET_TYPE_STR, - .widget.g.w = APP_SCREEN_W - w, - .widget.spec.str.font = _app_font_default, .widget.spec.str.str_size = 128, }, }; diff --git a/fw/fe310/test/status.c b/fw/fe310/test/status.c index 2f44842..b61fc13 100644 --- a/fw/fe310/test/status.c +++ b/fw/fe310/test/status.c @@ -14,6 +14,7 @@ #include <eve/eve.h> #include <eve/eve_kbd.h> +#include <eve/eve_font.h> #include <eve/screen/screen.h> #include <eve/screen/window.h> @@ -28,8 +29,6 @@ #include "phone.h" #include "status.h" -extern EVEFont *_app_font_default; - static char status_msg[128]; static int status_touch(EVEView *v, uint8_t tag0, int touch_idx) { diff --git a/fw/fe310/test/wifi.c b/fw/fe310/test/wifi.c index 5306d37..f7ca24d 100644 --- a/fw/fe310/test/wifi.c +++ b/fw/fe310/test/wifi.c @@ -14,6 +14,7 @@ #include <eve/eve.h> #include <eve/eve_kbd.h> +#include <eve/eve_font.h> #include <eve/screen/screen.h> #include <eve/screen/window.h> @@ -28,8 +29,6 @@ #include "status.h" #include "wifi.h" -extern EVEFont *_app_font_default; - static void wifi_scan(void) { unsigned char *buffer = eos_net_alloc(); buffer[0] = EOS_WIFI_MTYPE_SCAN; @@ -82,17 +81,13 @@ static void wifi_disconnect_handler(unsigned char type, unsigned char *buffer, u } void app_wifi(EVEWindow *window, EVEViewStack *stack) { - char *title = "Password:"; - uint16_t w = eve_font_str_w(_app_font_default, title) + 10; - APPWidgetSpec spec[] = { + EVEWidgetSpec spec[] = { { .label.g.w = APP_SCREEN_W, - .label.font = _app_font_default, .label.title = "Select network:", .widget.type = EVE_WIDGET_TYPE_SELECT, .widget.g.w = APP_SCREEN_W, - .widget.spec.select.font = _app_font_default, .widget.spec.select.option_size = 1500, }, { @@ -101,13 +96,9 @@ void app_wifi(EVEWindow *window, EVEViewStack *stack) { .widget.g.h = 50, }, { - .label.g.w = w, - .label.font = _app_font_default, - .label.title = title, + .label.title = "Password:", .widget.type = EVE_WIDGET_TYPE_STR, - .widget.g.w = APP_SCREEN_W - w, - .widget.spec.str.font = _app_font_default, .widget.spec.str.str_size = 128, }, }; |