summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/net.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2022-03-30 13:22:19 +0200
committerUros Majstorovic <majstor@majstor.org>2022-03-30 13:22:19 +0200
commitc6962c5700f99441538dafa346626bb7e6d12488 (patch)
treef463808368735c290312b7bff906f2599293d0ac /fw/fe310/eos/net.h
parent0a5f8363fe4e6b3c7d4f17fde61e00ab63e43bcb (diff)
sock api fixed; net reply messages fixed
Diffstat (limited to 'fw/fe310/eos/net.h')
-rw-r--r--fw/fe310/eos/net.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/fw/fe310/eos/net.h b/fw/fe310/eos/net.h
index 86496bb..79caf4b 100644
--- a/fw/fe310/eos/net.h
+++ b/fw/fe310/eos/net.h
@@ -3,9 +3,10 @@
/* common */
#define EOS_NET_MTU 1500
-#define EOS_NET_SIZE_BUF (EOS_NET_MTU + 4)
+#define EOS_NET_SIZE_BUF EOS_NET_MTU
#define EOS_NET_MTYPE_SOCK 1
+#define EOS_NET_MTYPE_RNG 3
#define EOS_NET_MTYPE_POWER 4
#define EOS_NET_MTYPE_WIFI 5
@@ -16,12 +17,16 @@
#define EOS_NET_MAX_MTYPE 8
#define EOS_NET_MTYPE_FLAG_ONEW 0x40
-#define EOS_NET_MTYPE_FLAG_REPW 0x80
+#define EOS_NET_MTYPE_FLAG_REPL 0x80
#define EOS_NET_MTYPE_FLAG_MASK 0xc0
/* fe310 specific */
#define EOS_NET_SIZE_BUFQ 2
+#define EOS_NET_FLAG_ONEW 0x1
+#define EOS_NET_FLAG_SYNC 0x2
+#define EOS_NET_FLAG_REPL 0x4
+
int eos_net_init(uint8_t wakeup_cause);
int eos_net_run(uint8_t wakeup_cause);
void eos_net_start(void);
@@ -36,5 +41,7 @@ void eos_net_acquire(void);
void eos_net_release(void);
unsigned char *eos_net_alloc(void);
void eos_net_free(unsigned char *buffer, unsigned char more);
-int eos_net_send(unsigned char type, unsigned char *buffer, uint16_t len, unsigned char more);
int eos_net_xchg(unsigned char *type, unsigned char *buffer, uint16_t *len);
+int eos_net_send(unsigned char type, unsigned char *buffer, uint16_t len);
+int eos_net_send_async(unsigned char type, unsigned char *buffer, uint16_t len, unsigned char more);
+int _eos_net_send(unsigned char type, unsigned char *buffer, uint16_t len, unsigned char async, unsigned char more);