diff --git a/src/internal/Esp32_i2s.c b/src/internal/Esp32_i2s.c index 652ddfa..9d65782 100644 --- a/src/internal/Esp32_i2s.c +++ b/src/internal/Esp32_i2s.c @@ -45,6 +45,7 @@ #include "driver/dac.h" #include "Esp32_i2s.h" #include "esp32-hal.h" +#include "esp32-hal-log.h" #if ESP_IDF_VERSION_MAJOR<=4 #define I2S_BASE_CLK (160000000L) diff --git a/src/internal/NeoEsp32I2sMethod.h b/src/internal/NeoEsp32I2sMethod.h index b3b8ee1..5667cf2 100644 --- a/src/internal/NeoEsp32I2sMethod.h +++ b/src/internal/NeoEsp32I2sMethod.h @@ -170,7 +170,9 @@ public: FillBuffers(); - i2sWrite(T_BUS::I2sBusNumber, _i2sBuffer, _i2sBufferSize, false, false); + const auto written = i2sWrite(T_BUS::I2sBusNumber, _i2sBuffer, _i2sBufferSize, false, false); + if (written != _i2sBufferSize) + ESP_LOGW("NEOPIXL", "written != bufferSize %zd %u", written, _i2sBufferSize); } uint8_t* getData() const @@ -273,4 +275,4 @@ typedef NeoEsp32I2s1Ws2812xInvertedMethod Neo800KbpsInvertedMethod; typedef NeoEsp32I2s1400KbpsInvertedMethod Neo400KbpsInvertedMethod; */ -#endif \ No newline at end of file +#endif