From 5d157b4f7ecea4793c9da5c33a890d4ea4afc545 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sun, 17 May 2020 04:03:16 +0200 Subject: power management implemented; net protocol change --- code/esp32/components/eos/include/net.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'code/esp32/components/eos/include/net.h') diff --git a/code/esp32/components/eos/include/net.h b/code/esp32/components/eos/include/net.h index df1bd0d..818776e 100644 --- a/code/esp32/components/eos/include/net.h +++ b/code/esp32/components/eos/include/net.h @@ -1,7 +1,10 @@ #include +/* common */ +#define EOS_NET_SIZE_BUF 1500 + #define EOS_NET_MTYPE_SOCK 1 -#define EOS_NET_MTYPE_AUDIO 2 +#define EOS_NET_MTYPE_POWER 4 #define EOS_NET_MTYPE_WIFI 5 #define EOS_NET_MTYPE_CELL 6 @@ -10,9 +13,9 @@ #define EOS_NET_MAX_MTYPE 8 -#define EOS_NET_MTYPE_FLAG_ONEW 0x10 +#define EOS_NET_MTYPE_FLAG_ONEW 0x80 -#define EOS_NET_SIZE_BUF 1500 +/* esp32 specific */ #define EOS_NET_SIZE_BUFQ 4 #define EOS_NET_SIZE_SNDQ 4 @@ -25,4 +28,6 @@ void eos_net_init(void); unsigned char *eos_net_alloc(void); void eos_net_free(unsigned char *buf); int eos_net_send(unsigned char mtype, unsigned char *buffer, uint16_t len, uint8_t flags); -void eos_net_set_handler(unsigned char mtype, eos_net_fptr_t handler); \ No newline at end of file +void eos_net_set_handler(unsigned char mtype, eos_net_fptr_t handler); +void eos_net_sleep_done(void); +void eos_net_wake(uint8_t source); -- cgit v1.2.3