Browse Source

0.8.147

fix compilation
pull/1759/head
lumapu 4 months ago
parent
commit
0b83e8bcb1
  1. 12
      src/hm/CommQueue.h
  2. 2
      src/platformio.ini

12
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 <uint8_t N=100>
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
};

2
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 =

Loading…
Cancel
Save