summaryrefslogtreecommitdiff
path: root/fw/fe310/test/wifi.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2022-08-09 23:07:38 +0200
committerUros Majstorovic <majstor@majstor.org>2022-08-09 23:07:38 +0200
commitb45c75151af9e31c2016fa30dc071f9695d6369c (patch)
tree590651bd3c37d0cb74a7414637b370d286368ff0 /fw/fe310/test/wifi.c
parent76ed6228dc0b88840d01f99761ca09323bf11c51 (diff)
fixed test
Diffstat (limited to 'fw/fe310/test/wifi.c')
-rw-r--r--fw/fe310/test/wifi.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/fw/fe310/test/wifi.c b/fw/fe310/test/wifi.c
index e7522e3..92be3db 100644
--- a/fw/fe310/test/wifi.c
+++ b/fw/fe310/test/wifi.c
@@ -4,8 +4,8 @@
#include <string.h>
#include <eos.h>
-#include <net.h>
-#include <wifi.h>
+#include <dev/net.h>
+#include <net/wifi.h>
#include <eve/eve.h>
#include <eve/eve_kbd.h>
@@ -15,8 +15,6 @@
#include <eve/screen/page.h>
#include <eve/screen/form.h>
-#include <eve/widget/widgets.h>
-
#include "app/app_root.h"
#include "app/app_status.h"
@@ -28,7 +26,7 @@ static void wifi_scan_handler(unsigned char type, unsigned char *buffer, uint16_
EVEForm *form = (EVEForm *)window->view;
EVESelectWidget *select = (EVESelectWidget *)eve_page_widget(&form->p, 0);
- eve_selectw_option_set(select, buffer + 1, size - 1);
+ eve_selectw_set_option(select, buffer + 1, size - 1);
eos_net_free(buffer, 0);
app_root_refresh();
@@ -45,14 +43,14 @@ static void wifi_disconnect_handler(unsigned char type, unsigned char *buffer, u
}
void app_wifi(EVEWindow *window, EVEViewStack *stack) {
- EVEWidgetSpec spec[] = {
+ EVEFormSpec spec[] = {
{
.label.g.w = APP_SCREEN_W,
.label.title = "Select network:",
.widget.type = EVE_WIDGET_TYPE_SELECT,
.widget.g.w = APP_SCREEN_W,
- .widget.spec.select.option_size = 1500,
+ .widget.tspec.select.option_size = 1500,
},
{
.widget.type = EVE_WIDGET_TYPE_SPACER,
@@ -63,7 +61,7 @@ void app_wifi(EVEWindow *window, EVEViewStack *stack) {
.label.title = "Password:",
.widget.type = EVE_WIDGET_TYPE_STR,
- .widget.spec.str.str_size = 128,
+ .widget.tspec.str.str_size = 128,
},
};
@@ -74,7 +72,7 @@ void app_wifi(EVEWindow *window, EVEViewStack *stack) {
void app_wifi_action(EVEForm *form) {
EVESelectWidget *sel = (EVESelectWidget *)eve_page_widget(&form->p, 0);
EVEStrWidget *str = (EVEStrWidget *)eve_page_widget(&form->p, 2);
- char *ssid = eve_selectw_option_get_select(sel);
+ char *ssid = eve_selectw_option_selected(sel);
if (ssid) {
eos_wifi_auth(ssid, str->str, NULL);