summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/net/wifi.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2022-08-09 22:23:08 +0200
committerUros Majstorovic <majstor@majstor.org>2022-08-09 22:23:08 +0200
commit3f913efda03fd840cd526ef72e6f397c7da61bd7 (patch)
tree08f62c93e0e0660fdb7beba32276ff1ceb7a8a3c /fw/fe310/eos/net/wifi.h
parent810dde21ee65653c15606917b19566cfbaaf165e (diff)
code layout
Diffstat (limited to 'fw/fe310/eos/net/wifi.h')
-rw-r--r--fw/fe310/eos/net/wifi.h29
1 files changed, 19 insertions, 10 deletions
diff --git a/fw/fe310/eos/net/wifi.h b/fw/fe310/eos/net/wifi.h
index 4a49518..2100144 100644
--- a/fw/fe310/eos/net/wifi.h
+++ b/fw/fe310/eos/net/wifi.h
@@ -1,18 +1,27 @@
#include <stdint.h>
-#include "event.h"
+#include "../event.h"
-#define EOS_WIFI_MTYPE_SCAN 1
-#define EOS_WIFI_MTYPE_AUTH 2
-#define EOS_WIFI_MTYPE_CONNECT 3
-#define EOS_WIFI_MTYPE_DISCONNECT 4
+#define EOS_WIFI_MTYPE_STATUS 0
+#define EOS_WIFI_MTYPE_SCAN 1
+#define EOS_WIFI_MTYPE_START 2
+#define EOS_WIFI_MTYPE_STOP 3
+#define EOS_WIFI_MTYPE_CONNECT 4
+#define EOS_WIFI_MTYPE_DISCONNECT 5
-#define EOS_WIFI_MAX_MTYPE 5
+#define EOS_WIFI_MAX_MTYPE 2
-void eos_wifi_netinit(void);
+#define EOS_WIFI_STATUS_OFF 0
+#define EOS_WIFI_STATUS_DISCONNECTED 1
+#define EOS_WIFI_STATUS_CONNECTED 2
+#define EOS_WIFI_STATUS_GOT_IP 3
+
+void eos_wifi_init(void);
void eos_wifi_set_handler(unsigned char mtype, eos_evt_handler_t handler);
eos_evt_handler_t eos_wifi_get_handler(unsigned char mtype);
+int eos_wifi_status(unsigned char *buffer, uint8_t *status, uint8_t ip_addr[], char *ssid);
+int eos_wifi_start(unsigned char *buffer);
+int eos_wifi_stop(unsigned char *buffer);
int eos_wifi_scan(unsigned char *buffer);
-int eos_wifi_auth(const char *ssid, const char *pass, unsigned char *buffer);
-int eos_wifi_connect(unsigned char *buffer);
-int eos_wifi_disconnect(unsigned char *buffer);
+int eos_wifi_connect(const char *ssid, const char *pwd, unsigned char *buffer);
+int eos_wifi_disconnect(unsigned char *buffer); \ No newline at end of file