mirror of https://github.com/arendst/Tasmota.git
WS2812 remove waits for RMT and SPI (#22617)
This commit is contained in:
parent
a12c934a4b
commit
c1834bd898
|
@ -186,12 +186,6 @@ extern "C" {
|
||||||
pixels_size = strip->PixelCount() * strip->PixelSize();
|
pixels_size = strip->PixelCount() * strip->PixelSize();
|
||||||
update_completed = strip->CanShow();
|
update_completed = strip->CanShow();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for RMT/I2S to complete fixes distortion due to analogRead
|
|
||||||
// 1ms is needed for 96 bytes
|
|
||||||
if (!update_completed) {
|
|
||||||
SystemBusyDelay((pixels_size + 95) / 96);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3: // # 03 : CanShow void -> bool
|
case 3: // # 03 : CanShow void -> bool
|
||||||
|
|
|
@ -186,12 +186,6 @@ long wsmap(long x, long in_min, long in_max, long out_min, long out_max) {
|
||||||
|
|
||||||
void Ws2812LibStripShow(void) {
|
void Ws2812LibStripShow(void) {
|
||||||
strip->Show();
|
strip->Show();
|
||||||
|
|
||||||
#if defined(USE_WS2812_DMA) || defined(USE_WS2812_RMT) || defined(USE_WS2812_I2S)
|
|
||||||
// Wait for DMA/RMT/I2S to complete fixes distortion due to analogRead
|
|
||||||
// delay((Settings->light_pixels >> 6) +1); // 256 / 64 = 4 +1 = 5
|
|
||||||
SystemBusyDelay( (Settings->light_pixels + 31) >> 5); // (256 + 32) / 32 = 8
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ws2812StripShow(void)
|
void Ws2812StripShow(void)
|
||||||
|
|
Loading…
Reference in New Issue