mirror of
https://github.com/nodemcu/nodemcu-firmware.git
synced 2025-01-16 20:52:57 +08:00
109f500be7
* apa102: remove dead code We can't store strings of hundreds of thousands of characters in RAM, so this can't possibly have fired, historically. Pixbufs are still RAM objects, so that's still out. With LFS, it would take a pathological example to hit the required 400KB TSTRING. * Add IRQ management functions * ws2812: fill UART FIFOs with IRQs off Refactor code to make the use of two fill loops less gross.
16 lines
289 B
C
16 lines
289 B
C
#pragma once
|
|
|
|
static inline uint32_t
|
|
esp8266_defer_irqs(void)
|
|
{
|
|
uint32_t state;
|
|
__asm__ __volatile__ ("rsil %0, 15" : "=a"(state) : : "memory");
|
|
return state;
|
|
}
|
|
|
|
static inline void
|
|
esp8266_restore_irqs(uint32_t state)
|
|
{
|
|
__asm__ __volatile__ ("wsr %0, ps" : : "a"(state) : "memory");
|
|
}
|