From 0b83e8bcb178d7699b42a3872cea647f3cc7f715 Mon Sep 17 00:00:00 2001 From: lumapu Date: Sun, 29 Sep 2024 23:48:42 +0200 Subject: [PATCH] 0.8.147 fix compilation --- src/hm/CommQueue.h | 12 ++++++++++++ src/platformio.ini | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/hm/CommQueue.h b/src/hm/CommQueue.h index 48a13cd3..90e61071 100644 --- a/src/hm/CommQueue.h +++ b/src/hm/CommQueue.h @@ -11,6 +11,12 @@ #include "hmInverter.h" #include "../utils/dbg.h" +#if !defined(ESP32) + #define vSemaphoreDelete(a) + #define xSemaphoreTake(a, b) + #define xSemaphoreGive(a) +#endif + template class CommQueue { protected: /* types */ @@ -80,8 +86,10 @@ class CommQueue { : wrPtr {0} , rdPtr {0} { + #if defined(ESP32) this->mutex = xSemaphoreCreateBinaryStatic(&this->mutex_buffer); xSemaphoreGive(this->mutex); + #endif } ~CommQueue() { @@ -186,8 +194,12 @@ class CommQueue { private: uint8_t wrPtr; uint8_t rdPtr; + #if defined(ESP32) SemaphoreHandle_t mutex; StaticSemaphore_t mutex_buffer; + #else + bool mutex; + #endif }; diff --git a/src/platformio.ini b/src/platformio.ini index e6811e0b..bf789ed9 100644 --- a/src/platformio.ini +++ b/src/platformio.ini @@ -154,7 +154,7 @@ platform = espressif32@6.7.0 board = lolin_d32 lib_deps = ${env.lib_deps} - https://github.com/mathieucarbou/ESPAsyncWebServer @ ^3.3.1 + https://github.com/mathieucarbou/ESPAsyncWebServer#v3.3.1 build_flags = ${env.build_flags} -DSPI_HAL monitor_filters =