summaryrefslogtreecommitdiff
path: root/fw/esp32/components/eos/include/app.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2021-08-27 02:34:46 +0200
committerUros Majstorovic <majstor@majstor.org>2021-08-27 02:34:46 +0200
commit53b7904443109da0aa06e3225cddc0bcbdf85b93 (patch)
tree4dd1de9b8e365224344d4dc40a3ce91b69be44c2 /fw/esp32/components/eos/include/app.h
parentf78eeaa085e6da05f4a79ea8c4cb5bd8bc77bbab (diff)
added spi driver for imx8; added lwip tun driver
Diffstat (limited to 'fw/esp32/components/eos/include/app.h')
-rw-r--r--fw/esp32/components/eos/include/app.h23
1 files changed, 23 insertions, 0 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);