mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
Interrupt cleanup
Fixes issue of reentrant calls to nointerrupts() exposed functional replacements to cli sei and SREG when dealing with interrupts InterruptLock class to auto stop and restore interrupt level Fix user ISR calls to be like Arduino with interrupts disabled fully.
This commit is contained in:
@ -65,8 +65,8 @@ inline bool ETS_INTR_WITHINISR()
|
||||
{
|
||||
uint32_t ps;
|
||||
__asm__ __volatile__("rsr %0,ps":"=a" (ps));
|
||||
// PS.EXCM bit check
|
||||
return ((ps & (1 << 4)) != 0);
|
||||
// PS.INTLEVEL check
|
||||
return ((ps & 0x0f) != 0);
|
||||
}
|
||||
|
||||
inline uint32_t ETS_INTR_ENABLED(void)
|
||||
|
Reference in New Issue
Block a user