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 c1bcfbe commit 9e2947bCopy full SHA for 9e2947b
cores/arduino/zephyrCommon.cpp
@@ -175,6 +175,22 @@ size_t analog_pin_index(pin_size_t pinNumber) {
175
176
#endif //CONFIG_ADC
177
178
+static unsigned int irq_key;
179
+static bool interrupts_disabled = false;
180
+
181
+void interrupts(void) {
182
+ if (interrupts_disabled) {
183
+ irq_unlock(irq_key);
184
+ interrupts_disabled = false;
185
+ }
186
+}
187
188
+void noInterrupts(void) {
189
+ if (!interrupts_disabled) {
190
+ irq_key = irq_lock();
191
+ interrupts_disabled = true;
192
193
194
}
195
196
void yield(void) {
0 commit comments