summaryrefslogtreecommitdiff
path: root/code/fe310/eos/net.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2020-05-17 04:03:23 +0200
committerUros Majstorovic <majstor@majstor.org>2020-05-17 04:03:23 +0200
commit75e57273a7ffded0ddcd3698ba68603c4be8a4cd (patch)
tree8b882cb41073ceadcdc5c27534a2dcc222adfb93 /code/fe310/eos/net.h
parent5d157b4f7ecea4793c9da5c33a890d4ea4afc545 (diff)
power management implemented; net protocol change
Diffstat (limited to 'code/fe310/eos/net.h')
-rw-r--r--code/fe310/eos/net.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/code/fe310/eos/net.h b/code/fe310/eos/net.h
index 5cb8da6..1aaea1f 100644
--- a/code/fe310/eos/net.h
+++ b/code/fe310/eos/net.h
@@ -1,22 +1,31 @@
#include <stdint.h>
#include "event.h"
-#define EOS_NET_SIZE_BUF 1500
-#define EOS_NET_SIZE_BUFQ 2
+/* common */
+#define EOS_NET_SIZE_BUF 1500
-#define EOS_NET_MTYPE_SOCK 1
-#define EOS_NET_MTYPE_AUDIO 2
+#define EOS_NET_MTYPE_SOCK 1
+#define EOS_NET_MTYPE_POWER 4
-#define EOS_NET_MTYPE_WIFI 5
-#define EOS_NET_MTYPE_CELL 6
-#define EOS_NET_MTYPE_SIP 7
-#define EOS_NET_MTYPE_APP 8
+#define EOS_NET_MTYPE_WIFI 5
+#define EOS_NET_MTYPE_CELL 6
+#define EOS_NET_MTYPE_SIP 7
+#define EOS_NET_MTYPE_APP 8
-#define EOS_NET_MAX_MTYPE 8
+#define EOS_NET_MAX_MTYPE 8
+
+#define EOS_NET_MTYPE_FLAG_ONEW 0x80
+
+/* fe310 specific */
+#define EOS_NET_SIZE_BUFQ 2
void eos_net_init(void);
void eos_net_start(void);
void eos_net_stop(void);
+int eos_net_sleep(uint32_t timeout);
+int eos_net_wake(uint8_t source);
+
+void eos_net_bad_handler(unsigned char type, unsigned char *buffer, uint16_t len);
void eos_net_set_handler(unsigned char type, eos_evt_handler_t handler);
void eos_net_acquire_for_evt(unsigned char type, char acq);