mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
xt disable and enable functions
This commit is contained in:
parent
c328452651
commit
b094b50e18
@ -139,6 +139,21 @@ extern void __detachInterrupt(uint8_t pin) {
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t interruptState = 0;
|
||||
|
||||
void xt_disable_interrupts()
|
||||
{
|
||||
__asm__ __volatile__("rsil %0,15":"=a" (interruptState));
|
||||
__asm__("esync");
|
||||
__asm__("isync");
|
||||
__asm__("dsync");
|
||||
}
|
||||
void xt_enable_interrupts()
|
||||
{
|
||||
__asm__ __volatile__("wsr %0,ps"::"a" (interruptState) : "memory");
|
||||
__asm__("esync");
|
||||
}
|
||||
|
||||
void initPins() {
|
||||
//Disable UART interrupts
|
||||
system_set_os_print(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user