Skip to content

Commit 55d608e

Browse files
Adds noInterrupt() and interrupt() functionality (espressif#7226)
* Adds noInterrupt() and interrupt() functionality * Adds sei/cli Adds back sei()/cli() macros Co-authored-by: Jan Procházka <[email protected]>
1 parent dca1a1e commit 55d608e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: cores/esp32/Arduino.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@
7979
#define degrees(rad) ((rad)*RAD_TO_DEG)
8080
#define sq(x) ((x)*(x))
8181

82-
#define sei()
83-
#define cli()
82+
// ESP32xx runs FreeRTOS... disabling interrupts can lead to issues, such as Watchdog Timeout
83+
#define sei() portENABLE_INTERRUPTS()
84+
#define cli() portDISABLE_INTERRUPTS()
8485
#define interrupts() sei()
8586
#define noInterrupts() cli()
8687

0 commit comments

Comments
 (0)