Skip to content

Commit

Permalink
Adds noInterrupt() and interrupt() functionality (#7226)
Browse files Browse the repository at this point in the history
* Adds noInterrupt() and interrupt() functionality

* Adds sei/cli

Adds back sei()/cli() macros

Co-authored-by: Jan Procházka <[email protected]>
  • Loading branch information
SuGlider and P-R-O-C-H-Y authored Sep 15, 2022
1 parent dca1a1e commit 55d608e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cores/esp32/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@
#define degrees(rad) ((rad)*RAD_TO_DEG)
#define sq(x) ((x)*(x))

#define sei()
#define cli()
// ESP32xx runs FreeRTOS... disabling interrupts can lead to issues, such as Watchdog Timeout
#define sei() portENABLE_INTERRUPTS()
#define cli() portDISABLE_INTERRUPTS()
#define interrupts() sei()
#define noInterrupts() cli()

Expand Down

0 comments on commit 55d608e

Please sign in to comment.