forked from Makuna/NeoPixelBus
subscribe and unscubscribe consistent
This commit is contained in:
@@ -99,8 +99,11 @@ void NeoEsp8266UartInterruptContext::Attach()
|
|||||||
|
|
||||||
void NeoEsp8266UartInterruptContext::Detach()
|
void NeoEsp8266UartInterruptContext::Detach()
|
||||||
{
|
{
|
||||||
// uart_unsubscribeInterrupt is safe and does INT enable and disable within it
|
ETS_UART_INTR_DISABLE();
|
||||||
uart_unsubscribeInterrupt(_uartNum, Isr);
|
if (uart_unsubscribeInterrupt(_uartNum, Isr))
|
||||||
|
{
|
||||||
|
ETS_UART_INTR_ENABLE();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICACHE_RAM_ATTR NeoEsp8266UartInterruptContext::Isr(void* param)
|
void ICACHE_RAM_ATTR NeoEsp8266UartInterruptContext::Isr(void* param)
|
||||||
|
@@ -114,7 +114,7 @@ public:
|
|||||||
static const uint32_t Index = 0;
|
static const uint32_t Index = 0;
|
||||||
static void Init()
|
static void Init()
|
||||||
{
|
{
|
||||||
pinMode(1, SPECIAL);
|
pinMode(1, FUNCTION_0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user