summaryrefslogtreecommitdiff
path: root/fw/esp32/components/eos/include/net_priv.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2025-07-28 23:37:45 +0200
committerUros Majstorovic <majstor@majstor.org>2025-07-28 23:37:45 +0200
commitfc70c6f78f43dbeda91d47b2d2071d4da4082121 (patch)
treec104744b62d3ea2c1a4a05eaab8283f368215300 /fw/esp32/components/eos/include/net_priv.h
parent58f41971b1e801ad2fbcea08e5152afa2b18ca73 (diff)
upgrade to ESP-IDF v5; fixed SPI net and app protocoles; reimplemented power management;
Diffstat (limited to 'fw/esp32/components/eos/include/net_priv.h')
-rw-r--r--fw/esp32/components/eos/include/net_priv.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/fw/esp32/components/eos/include/net_priv.h b/fw/esp32/components/eos/include/net_priv.h
new file mode 100644
index 0000000..fa1de61
--- /dev/null
+++ b/fw/esp32/components/eos/include/net_priv.h
@@ -0,0 +1,33 @@
+#define NET_DEV_NET EOS_PWR_DEV_NET
+#define NET_DEV_APP EOS_PWR_DEV_APP
+
+typedef struct NETConfig {
+ int sleep;
+ int sleep_req;
+ int present;
+ int gpio_mosi;
+ int gpio_miso;
+ int gpio_sclk;
+ int gpio_cs;
+ int gpio_rts;
+ int gpio_cts;
+ uint32_t dev;
+ spi_host_device_t spi_host;
+ spi_bus_config_t *spi_bus_cfg;
+ spi_slave_interface_config_t *spi_iface_cfg;
+ spi_slave_transaction_t *spi_tr_cfg;
+ TaskHandle_t xchg_task_handle;
+ SemaphoreHandle_t mutex;
+ SemaphoreHandle_t bufq_mutex;
+ SemaphoreHandle_t bufq_semaph;
+ EOSBufQ *buf_q;
+ EOSMsgQ *send_q;
+ eos_net_handler_t msg_handler;
+} NETConfig;
+
+void _eos_net_init_gpio(NETConfig *config);
+unsigned char *_eos_net_alloc(NETConfig *config);
+void _eos_net_free(NETConfig *config, unsigned char *buf);
+int _eos_net_send(NETConfig *config, unsigned char mtype, unsigned char *buffer, uint16_t buf_len);
+void _eos_net_sleep_req(NETConfig *config);
+void _eos_net_wake(NETConfig *config);