summaryrefslogtreecommitdiff
path: root/fw/esp32/components/eos/include
diff options
context:
space:
mode:
Diffstat (limited to 'fw/esp32/components/eos/include')
-rw-r--r--fw/esp32/components/eos/include/app.h23
-rw-r--r--fw/esp32/components/eos/include/eos.h14
-rw-r--r--fw/esp32/components/eos/include/net.h3
-rw-r--r--fw/esp32/components/eos/include/tun.h1
4 files changed, 34 insertions, 7 deletions
diff --git a/fw/esp32/components/eos/include/app.h b/fw/esp32/components/eos/include/app.h
new file mode 100644
index 0000000..2033b2b
--- /dev/null
+++ b/fw/esp32/components/eos/include/app.h
@@ -0,0 +1,23 @@
+#include <stdint.h>
+
+/* common */
+#define EOS_APP_MTU 1500
+#define EOS_APP_SIZE_BUF EOS_APP_MTU
+
+#define EOS_APP_MTYPE_TUN 1
+#define EOS_APP_MAX_MTYPE 8
+
+#define EOS_APP_MTYPE_FLAG_MASK 0xc0
+
+/* esp32 specific */
+#define EOS_APP_SIZE_BUFQ 4
+#define EOS_APP_SIZE_SNDQ 4
+
+typedef void (*eos_app_fptr_t) (unsigned char, unsigned char *, uint16_t);
+
+void eos_app_init(void);
+
+unsigned char *eos_app_alloc(void);
+void eos_app_free(unsigned char *buf);
+int eos_app_send(unsigned char mtype, unsigned char *buffer, uint16_t len);
+void eos_app_set_handler(unsigned char mtype, eos_app_fptr_t handler);
diff --git a/fw/esp32/components/eos/include/eos.h b/fw/esp32/components/eos/include/eos.h
index 7240c83..6f420ea 100644
--- a/fw/esp32/components/eos/include/eos.h
+++ b/fw/esp32/components/eos/include/eos.h
@@ -7,19 +7,21 @@
#define EOS_ERR_EMPTY -11
#define EOS_ERR_NOTFOUND -12
+#define EOS_TASK_PRIORITY_NET_XCHG 1
+#define EOS_TASK_PRIORITY_APP_XCHG 1
+#define EOS_TASK_PRIORITY_UDP_RCVR 1
#define EOS_TASK_PRIORITY_UART 1
#define EOS_TASK_PRIORITY_MODEM 1
#define EOS_TASK_PRIORITY_I2S 1
-#define EOS_TASK_PRIORITY_NET_XCHG 1
-#define EOS_TASK_PRIORITY_UDP_RCVR 1
-#define EOS_TASK_PRIORITY_PWR 1
#define EOS_TASK_PRIORITY_CELL 1
+#define EOS_TASK_PRIORITY_PWR 1
+#define EOS_TASK_SSIZE_NET_XCHG 8192
+#define EOS_TASK_SSIZE_APP_XCHG 8192
+#define EOS_TASK_SSIZE_UDP_RCVR 4096
#define EOS_TASK_SSIZE_UART 4096
#define EOS_TASK_SSIZE_MODEM 4096
#define EOS_TASK_SSIZE_I2S 4096
-#define EOS_TASK_SSIZE_NET_XCHG 8192
-#define EOS_TASK_SSIZE_UDP_RCVR 4096
-#define EOS_TASK_SSIZE_PWR 4096
#define EOS_TASK_SSIZE_CELL 4096
+#define EOS_TASK_SSIZE_PWR 4096
diff --git a/fw/esp32/components/eos/include/net.h b/fw/esp32/components/eos/include/net.h
index f6b3700..cf0cb6b 100644
--- a/fw/esp32/components/eos/include/net.h
+++ b/fw/esp32/components/eos/include/net.h
@@ -1,7 +1,8 @@
#include <stdint.h>
/* common */
-#define EOS_NET_SIZE_BUF 1500
+#define EOS_NET_MTU 1500
+#define EOS_NET_SIZE_BUF EOS_NET_MTU
#define EOS_NET_MTYPE_SOCK 1
#define EOS_NET_MTYPE_POWER 4
diff --git a/fw/esp32/components/eos/include/tun.h b/fw/esp32/components/eos/include/tun.h
new file mode 100644
index 0000000..3acb2a6
--- /dev/null
+++ b/fw/esp32/components/eos/include/tun.h
@@ -0,0 +1 @@
+void eos_tun_init(void); \ No newline at end of file