Skip to content

Commit d6e2473

Browse files
committed
small update for code clarity
wraping esp32SemGive inro #ifdef ESP32 does not change the behavior, but makes the logic easier to understand.
1 parent c185f37 commit d6e2473

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

wled00/util.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ bool requestJSONBufferLock(uint8_t module)
238238
#endif
239239

240240
if (jsonBufferLock || !haveLock) {
241+
#ifdef ARDUINO_ARCH_ESP32
241242
if (haveLock) esp32SemGive(jsonBufferLockMutex); // we got the mutex, but jsonBufferLock says the opposite -> give up
243+
#endif
242244
USER_PRINT(F("ERROR: Locking JSON buffer failed! (still locked by "));
243245
USER_PRINT(jsonBufferLock);
244246
USER_PRINTLN(")");
@@ -263,7 +265,9 @@ void releaseJSONBufferLock()
263265
DEBUG_PRINTLN(")");
264266
fileDoc = nullptr;
265267
jsonBufferLock = 0;
268+
#ifdef ARDUINO_ARCH_ESP32
266269
esp32SemGive(jsonBufferLockMutex); // return the mutex
270+
#endif
267271
}
268272

269273

0 commit comments

Comments
 (0)