We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3538c54 commit fd926edCopy full SHA for fd926ed
cores/arduino/zephyrCommon.cpp
@@ -464,3 +464,18 @@ void disableInterrupt(pin_size_t pinNumber) {
464
pcb->handlers[BIT(arduino_pins[pinNumber].pin)].enabled = false;
465
}
466
467
+
468
+static unsigned int irq_key = UINT_MAX;
469
470
+void interrupts(void) {
471
+ if (irq_key != UINT_MAX) {
472
+ irq_unlock(irq_key);
473
+ irq_key = UINT_MAX;
474
+ }
475
+}
476
477
+void noInterrupts(void) {
478
+ if (irq_key == UINT_MAX) {
479
+ irq_key = irq_lock();
480
481
0 commit comments