From 9023b16ebb7690afb52e96b37997ce3152e21fb9 Mon Sep 17 00:00:00 2001 From: "Dirk O. Kaar" Date: Mon, 24 Jun 2019 21:52:37 +0200 Subject: [PATCH 1/3] Duplicate definition of InterruptLock on ESP8266 - exists in cores/esp8266/interrupts.h there. --- DHT.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/DHT.h b/DHT.h index d22c276..cd67967 100644 --- a/DHT.h +++ b/DHT.h @@ -20,6 +20,11 @@ #include "Arduino.h" + #if defined(ESP8266) + #include + #endif + + /* Uncomment to enable printing out nice debug messages. */ //#define DHT_DEBUG @@ -89,6 +94,7 @@ class DHT { uint32_t expectPulse(bool level); }; +#if !defined(ESP8266) /*! * @brief Class that defines Interrupt Lock Avaiability */ @@ -105,5 +111,6 @@ class InterruptLock { #endif } }; +#endif #endif From 2d5b60f32eac51a7628014891185d713329852bf Mon Sep 17 00:00:00 2001 From: "Dirk O. Kaar" Date: Tue, 25 Jun 2019 12:16:29 +0200 Subject: [PATCH 2/3] Align with namespace change in ESP8266 Arduino implementation of InterruptLock. --- DHT.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DHT.h b/DHT.h index cd67967..83fdeb9 100644 --- a/DHT.h +++ b/DHT.h @@ -24,7 +24,6 @@ #include #endif - /* Uncomment to enable printing out nice debug messages. */ //#define DHT_DEBUG @@ -94,7 +93,9 @@ class DHT { uint32_t expectPulse(bool level); }; -#if !defined(ESP8266) +#if defined(ESP8266) +using esp8266::InterruptLock; +#else /*! * @brief Class that defines Interrupt Lock Avaiability */ From 2cd0d5824720eb07f600157ea6d0bc9065712fad Mon Sep 17 00:00:00 2001 From: "Dirk O. Kaar" Date: Thu, 18 Jul 2019 23:13:39 +0200 Subject: [PATCH 3/3] Revert "Align with namespace change in ESP8266 Arduino implementation of InterruptLock." Until next release of ESP8266 Arduino, the accompanying fix for the same issue there is not available to use - undo this revert when time comes. This reverts commit 65b884afe53bb160f3723ac83342bb23244fceb4. --- DHT.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/DHT.h b/DHT.h index 83fdeb9..cd67967 100644 --- a/DHT.h +++ b/DHT.h @@ -24,6 +24,7 @@ #include #endif + /* Uncomment to enable printing out nice debug messages. */ //#define DHT_DEBUG @@ -93,9 +94,7 @@ class DHT { uint32_t expectPulse(bool level); }; -#if defined(ESP8266) -using esp8266::InterruptLock; -#else +#if !defined(ESP8266) /*! * @brief Class that defines Interrupt Lock Avaiability */