Skip to content

Commit

Permalink
0.8.147
Browse files Browse the repository at this point in the history
fix compilation
  • Loading branch information
lumapu committed Sep 29, 2024
1 parent 27c77f4 commit 0b83e8b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/hm/CommQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -80,8 +86,10 @@ class CommQueue {
: wrPtr {0}
, rdPtr {0}
{
#if defined(ESP32)
this->mutex = xSemaphoreCreateBinaryStatic(&this->mutex_buffer);
xSemaphoreGive(this->mutex);
#endif
}

~CommQueue() {
Expand Down Expand Up @@ -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
};


Expand Down
2 changes: 1 addition & 1 deletion src/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 0b83e8b

Please sign in to comment.