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 c328452 commit b094b50Copy full SHA for b094b50
cores/esp8266/core_esp8266_wiring_digital.c
@@ -139,6 +139,21 @@ extern void __detachInterrupt(uint8_t pin) {
139
}
140
141
142
+static uint32_t interruptState = 0;
143
+
144
+void xt_disable_interrupts()
145
+{
146
+ __asm__ __volatile__("rsil %0,15":"=a" (interruptState));
147
+ __asm__("esync");
148
+ __asm__("isync");
149
+ __asm__("dsync");
150
+}
151
+void xt_enable_interrupts()
152
153
+ __asm__ __volatile__("wsr %0,ps"::"a" (interruptState) : "memory");
154
155
156
157
void initPins() {
158
//Disable UART interrupts
159
system_set_os_print(0);
0 commit comments