Skip to content

Commit

Permalink
0.8.151
Browse files Browse the repository at this point in the history
fix ESP8266 compilation
  • Loading branch information
lumapu committed Oct 3, 2024
1 parent f06e56c commit d1fbb7d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/hm/CommQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
#include "../utils/dbg.h"

#if !defined(ESP32)
#define vSemaphoreDelete(a)
#define xSemaphoreTake(a, b)
#define xSemaphoreGive(a)
#if !defined(vSemaphoreDelete)
#define vSemaphoreDelete(a)
#define xSemaphoreTake(a, b) { while(a) { yield(); } a = true; }
#define xSemaphoreGive(a) { a = false; }
#endif
#endif

template <uint8_t N=100>
Expand Down
7 changes: 5 additions & 2 deletions src/publisher/pubMqtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
#if defined(ENABLE_MQTT)
#ifdef ESP8266
#include <ESP8266WiFi.h>
#define xSemaphoreTake(a, b) { while(a) { yield(); } a = true; }
#define xSemaphoreGive(a) { a = false; }
#if !defined(vSemaphoreDelete)
#define vSemaphoreDelete(a)
#define xSemaphoreTake(a, b) { while(a) { yield(); } a = true; }
#define xSemaphoreGive(a) { a = false; }
#endif
#elif defined(ESP32)
#include <WiFi.h>
#endif
Expand Down

0 comments on commit d1fbb7d

Please sign in to comment.