فهرست منبع

Wait for LED DMA transfer before releasing SmartLed buffers

SybexXx 1 روز پیش
والد
کامیت
93644aaeae
1فایلهای تغییر یافته به همراه2 افزوده شده و 3 حذف شده
  1. 2 3
      code/components/jomjol_controlGPIO/server_GPIO.cpp

+ 2 - 3
code/components/jomjol_controlGPIO/server_GPIO.cpp

@@ -320,9 +320,8 @@ void GpioHandler::deinit() {
     }
 #ifdef __LEDGLOBAL
     if (leds_global != NULL) {
-        if (!leds_global->wait(pdMS_TO_TICKS(1000))) {
-            ESP_LOGW(TAG, "Timed out waiting for LED transmission before deinit");
-        }
+        // Wait until RMT has finished using the LED buffers before destroying the driver.
+        leds_global->wait();
         delete leds_global;
         leds_global = NULL;
     }