From fc70c6f78f43dbeda91d47b2d2071d4da4082121 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Mon, 28 Jul 2025 23:37:45 +0200 Subject: upgrade to ESP-IDF v5; fixed SPI net and app protocoles; reimplemented power management; --- fw/esp32/components/eos/include/net_priv.h | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 fw/esp32/components/eos/include/net_priv.h (limited to 'fw/esp32/components/eos/include/net_priv.h') 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); -- cgit v1.2.3