File tree 2 files changed +13
-1
lines changed
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 11
11
#include " hmInverter.h"
12
12
#include " ../utils/dbg.h"
13
13
14
+ #if !defined(ESP32)
15
+ #define vSemaphoreDelete (a )
16
+ #define xSemaphoreTake (a, b )
17
+ #define xSemaphoreGive (a )
18
+ #endif
19
+
14
20
template <uint8_t N=100 >
15
21
class CommQueue {
16
22
protected: /* types */
@@ -80,8 +86,10 @@ class CommQueue {
80
86
: wrPtr {0 }
81
87
, rdPtr {0 }
82
88
{
89
+ #if defined(ESP32)
83
90
this ->mutex = xSemaphoreCreateBinaryStatic (&this ->mutex_buffer );
84
91
xSemaphoreGive (this ->mutex );
92
+ #endif
85
93
}
86
94
87
95
~CommQueue () {
@@ -186,8 +194,12 @@ class CommQueue {
186
194
private:
187
195
uint8_t wrPtr;
188
196
uint8_t rdPtr;
197
+ #if defined(ESP32)
189
198
SemaphoreHandle_t mutex;
190
199
StaticSemaphore_t mutex_buffer;
200
+ #else
201
+ bool mutex;
202
+ #endif
191
203
};
192
204
193
205
Original file line number Diff line number Diff line change 154
154
board = lolin_d32
155
155
lib_deps =
156
156
${env.lib_deps}
157
- https://github.com/mathieucarbou/ESPAsyncWebServer @ ^3 .3.1
157
+ https://github.com/mathieucarbou/ESPAsyncWebServer# v3 .3.1
158
158
build_flags = ${env.build_flags}
159
159
-DSPI_HAL
160
160
monitor_filters =
You can’t perform that action at this time.
0 commit comments