From c1834bd898e0da51e7accee4218aa686fe80462f Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Mon, 9 Dec 2024 22:45:23 +0100 Subject: [PATCH] WS2812 remove waits for RMT and SPI (#22617) --- tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_leds.ino | 6 ------ tasmota/tasmota_xlgt_light/xlgt_01_ws2812_esp32.ino | 6 ------ 2 files changed, 12 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_leds.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_leds.ino index a06890b09..ab5c9246a 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_leds.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_leds.ino @@ -186,12 +186,6 @@ extern "C" { pixels_size = strip->PixelCount() * strip->PixelSize(); 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; case 3: // # 03 : CanShow void -> bool diff --git a/tasmota/tasmota_xlgt_light/xlgt_01_ws2812_esp32.ino b/tasmota/tasmota_xlgt_light/xlgt_01_ws2812_esp32.ino index e6caffc43..dc5b47120 100644 --- a/tasmota/tasmota_xlgt_light/xlgt_01_ws2812_esp32.ino +++ b/tasmota/tasmota_xlgt_light/xlgt_01_ws2812_esp32.ino @@ -186,12 +186,6 @@ long wsmap(long x, long in_min, long in_max, long out_min, long out_max) { void Ws2812LibStripShow(void) { 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)