diff options
author | Uros Majstorovic <majstor@majstor.org> | 2025-07-28 23:37:45 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2025-07-28 23:37:45 +0200 |
commit | fc70c6f78f43dbeda91d47b2d2071d4da4082121 (patch) | |
tree | c104744b62d3ea2c1a4a05eaab8283f368215300 /fw/esp32/components/eos/include/app.h | |
parent | 58f41971b1e801ad2fbcea08e5152afa2b18ca73 (diff) |
upgrade to ESP-IDF v5; fixed SPI net and app protocoles; reimplemented power management;
Diffstat (limited to 'fw/esp32/components/eos/include/app.h')
-rw-r--r-- | fw/esp32/components/eos/include/app.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/fw/esp32/components/eos/include/app.h b/fw/esp32/components/eos/include/app.h index 2033b2b..b6dba99 100644 --- a/fw/esp32/components/eos/include/app.h +++ b/fw/esp32/components/eos/include/app.h @@ -1,5 +1,7 @@ #include <stdint.h> +#include "net.h" + /* common */ #define EOS_APP_MTU 1500 #define EOS_APP_SIZE_BUF EOS_APP_MTU @@ -7,17 +9,18 @@ #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); +void eos_app_run(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); + +int eos_app_send(unsigned char mtype, unsigned char *buffer, uint16_t buf_len); + +void eos_app_sleep_req(void); +void eos_app_wake(void); +void eos_app_set_handler(unsigned char mtype, eos_net_handler_t handler); |