Fixed compilation with newer libraries

This commit is contained in:
2021-02-28 23:06:14 +01:00
parent 7be759c577
commit e256389bd7
2 changed files with 5 additions and 2 deletions

View File

@ -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)

View File

@ -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
#endif