Skip to content

Commit 18d0a37

Browse files
committedFeb 15, 2017
all interruption should be disabled here
·
v0.8v0.6
1 parent 0ab983e commit 18d0a37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎firmware-src/sources/dhonewire.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,12 +356,12 @@ void ICACHE_FLASH_ATTR dhonewire_ws2812b_write(const char *buf, unsigned int len
356356
const unsigned L = 750 * freq / 1000;
357357
const char *ebuf = buf + len;
358358
const unsigned int pin = (1 << mOneWirePin);
359-
ETS_GPIO_INTR_DISABLE();
359+
ETS_INTR_LOCK();
360360

361361
// send reset, low more then 50 ms
362362
gpio_output_set(0, pin, pin, 0); // low and initialize
363363
os_delay_us(50);
364364
ws2812b_write(buf, ebuf, pin, S + L, S, L);
365365

366-
ETS_GPIO_INTR_ENABLE();
366+
ETS_INTR_UNLOCK();
367367
}

0 commit comments

Comments
 (0)
Please sign in to comment.