From 02a4d53cbeb31fbaf6f1f7773a27a04fa47031f3 Mon Sep 17 00:00:00 2001 From: mch3000 <8798950+mch3000@users.noreply.github.com> Date: Wed, 29 Dec 2021 13:37:20 +1100 Subject: [PATCH 1/4] Update DFRobotAS3935LightningSensorDetailed.ino Added "IRAM_ATTR" to ISR definition https://arduino-esp8266.readthedocs.io/en/latest/reference.html?highlight=IRAM_ATTR#digital-io --- .../DFRobotAS3935LightningSensorDetailed.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/DFRobotAS3935LightningSensorDetailed/DFRobotAS3935LightningSensorDetailed.ino b/examples/DFRobotAS3935LightningSensorDetailed/DFRobotAS3935LightningSensorDetailed.ino index 40b141a..c3d7f84 100644 --- a/examples/DFRobotAS3935LightningSensorDetailed/DFRobotAS3935LightningSensorDetailed.ino +++ b/examples/DFRobotAS3935LightningSensorDetailed/DFRobotAS3935LightningSensorDetailed.ino @@ -128,7 +128,7 @@ void loop() } //IRQ handler for AS3935 interrupts -void AS3935_ISR() +void IRAM_ATTR AS3935_ISR() { AS3935IsrTrig = 1; } From 74895cb63c55910e63deb60b554fe5f7cc45d7e3 Mon Sep 17 00:00:00 2001 From: mch3000 <8798950+mch3000@users.noreply.github.com> Date: Wed, 29 Dec 2021 13:37:57 +1100 Subject: [PATCH 2/4] Update DFRobotAS3935LightningSensorOrdinary.ino Added "IRAM_ATTR" to ISR definition https://arduino-esp8266.readthedocs.io/en/latest/reference.html?highlight=IRAM_ATTR#digital-io --- .../DFRobotAS3935LightningSensorOrdinary.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/DFRobotAS3935LightningSensorOrdinary/DFRobotAS3935LightningSensorOrdinary.ino b/examples/DFRobotAS3935LightningSensorOrdinary/DFRobotAS3935LightningSensorOrdinary.ino index 340826b..0a02231 100644 --- a/examples/DFRobotAS3935LightningSensorOrdinary/DFRobotAS3935LightningSensorOrdinary.ino +++ b/examples/DFRobotAS3935LightningSensorOrdinary/DFRobotAS3935LightningSensorOrdinary.ino @@ -106,7 +106,7 @@ void loop() } } //IRQ handler for AS3935 interrupts -void AS3935_ISR() +void IRAM_ATTR AS3935_ISR() { AS3935IsrTrig = 1; } From a870e23d53605c658c4260589aab2c7d010e36fa Mon Sep 17 00:00:00 2001 From: mch3000 <8798950+mch3000@users.noreply.github.com> Date: Wed, 29 Dec 2021 13:42:43 +1100 Subject: [PATCH 3/4] Update DFRobotAS3935LightningSensorDetailed.ino --- .../DFRobotAS3935LightningSensorDetailed.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/DFRobotAS3935LightningSensorDetailed/DFRobotAS3935LightningSensorDetailed.ino b/examples/DFRobotAS3935LightningSensorDetailed/DFRobotAS3935LightningSensorDetailed.ino index c3d7f84..4ebb707 100644 --- a/examples/DFRobotAS3935LightningSensorDetailed/DFRobotAS3935LightningSensorDetailed.ino +++ b/examples/DFRobotAS3935LightningSensorDetailed/DFRobotAS3935LightningSensorDetailed.ino @@ -128,7 +128,11 @@ void loop() } //IRQ handler for AS3935 interrupts +#if defined(ESP32) || defined(ESP8266) void IRAM_ATTR AS3935_ISR() +#else +void AS3935_ISR() +#endif { AS3935IsrTrig = 1; } From 3d2ec5432203a90b37570ae66d6ba56066ad6358 Mon Sep 17 00:00:00 2001 From: mch3000 <8798950+mch3000@users.noreply.github.com> Date: Wed, 29 Dec 2021 13:47:42 +1100 Subject: [PATCH 4/4] Update DFRobotAS3935LightningSensorOrdinary.ino --- .../DFRobotAS3935LightningSensorOrdinary.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/DFRobotAS3935LightningSensorOrdinary/DFRobotAS3935LightningSensorOrdinary.ino b/examples/DFRobotAS3935LightningSensorOrdinary/DFRobotAS3935LightningSensorOrdinary.ino index 0a02231..69ae375 100644 --- a/examples/DFRobotAS3935LightningSensorOrdinary/DFRobotAS3935LightningSensorOrdinary.ino +++ b/examples/DFRobotAS3935LightningSensorOrdinary/DFRobotAS3935LightningSensorOrdinary.ino @@ -106,7 +106,11 @@ void loop() } } //IRQ handler for AS3935 interrupts +#if defined(ESP32) || defined(ESP8266) void IRAM_ATTR AS3935_ISR() +#else +void AS3935_ISR() +#endif { AS3935IsrTrig = 1; }