diff --git a/lib/NeoESP32RmtHI/include/NeoEsp32RmtHIMethod.h b/lib/NeoESP32RmtHI/include/NeoEsp32RmtHIMethod.h index 02e066f7..7d50191a 100644 --- a/lib/NeoESP32RmtHI/include/NeoEsp32RmtHIMethod.h +++ b/lib/NeoESP32RmtHI/include/NeoEsp32RmtHIMethod.h @@ -33,6 +33,24 @@ License along with NeoPixel. If not, see // Use the NeoEspRmtSpeed types from the driver-based implementation #include +#if !defined(ESP_ERROR_CHECK_WITHOUT_ABORT_SILENT_TIMEOUT) +// macro backported from NPB 2.8.3 +#if defined NDEBUG || defined CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT +#define ESP_ERROR_CHECK_WITHOUT_ABORT_SILENT_TIMEOUT(x) ({ \ + esp_err_t err_rc_ = (x); \ + err_rc_; \ + }) +#else +#define ESP_ERROR_CHECK_WITHOUT_ABORT_SILENT_TIMEOUT(x) ({ \ + esp_err_t err_rc_ = (x); \ + if (unlikely(err_rc_ != ESP_OK && err_rc_ != ESP_ERR_TIMEOUT)) { \ + _esp_error_check_failed_without_abort(err_rc_, __FILE__, __LINE__, \ + __ASSERT_FUNC, #x); \ + } \ + err_rc_; \ + }) +#endif // NDEBUG +#endif namespace NeoEsp32RmtHiMethodDriver { // Install the driver for a specific channel, specifying timing properties diff --git a/lib/NeoESP32RmtHI/library.json b/lib/NeoESP32RmtHI/library.json index 0608e59e..292cfd78 100644 --- a/lib/NeoESP32RmtHI/library.json +++ b/lib/NeoESP32RmtHI/library.json @@ -6,7 +6,7 @@ { "owner": "makuna", "name": "NeoPixelBus", - "version": "^2.8.3" + "version": "^2.7.9" } ] } diff --git a/wled00/bus_wrapper.h b/wled00/bus_wrapper.h index 64dcd5b9..846277ba 100644 --- a/wled00/bus_wrapper.h +++ b/wled00/bus_wrapper.h @@ -183,10 +183,21 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca #define B_8266_BB_UCS_4 NeoPixelBusLg //4 chan, esp8266, bb (any pin) #endif + +// RMT driver selection +#if !defined(WLED_USE_SHARED_RMT) && !defined(__riscv) && defined(ARDUINO_ARCH_ESP32) && (ESP_IDF_VERSION_MAJOR >= 4) + +#include +#define NeoEsp32RmtMethod(x) NeoEsp32RmtHIN ## x ## Method +#else +#define NeoEsp32RmtMethod(x) NeoEsp32RmtN ## x ## Method +#endif + + /*** ESP32 Neopixel methods ***/ #ifdef ARDUINO_ARCH_ESP32 //RGB -#define B_32_RN_NEO_3 NeoPixelBusLg +#define B_32_RN_NEO_3 NeoPixelBusLg #ifndef WLED_NO_I2S0_PIXELBUS #define B_32_I0_NEO_3 NeoPixelBusLg #endif @@ -195,7 +206,7 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca #endif //#define B_32_BB_NEO_3 NeoPixelBrightnessBus // NeoEsp8266BitBang800KbpsMethod //RGBW -#define B_32_RN_NEO_4 NeoPixelBusLg +#define B_32_RN_NEO_4 NeoPixelBusLg #ifndef WLED_NO_I2S0_PIXELBUS #define B_32_I0_NEO_4 NeoPixelBusLg #endif @@ -204,7 +215,7 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca #endif //#define B_32_BB_NEO_4 NeoPixelBrightnessBus // NeoEsp8266BitBang800KbpsMethod //400Kbps -#define B_32_RN_400_3 NeoPixelBusLg +#define B_32_RN_400_3 NeoPixelBusLg #ifndef WLED_NO_I2S0_PIXELBUS #define B_32_I0_400_3 NeoPixelBusLg #endif @@ -213,7 +224,7 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca #endif //#define B_32_BB_400_3 NeoPixelBrightnessBus // NeoEsp8266BitBang400KbpsMethod //TM1814 (RGBW) -#define B_32_RN_TM1_4 NeoPixelBusLg +#define B_32_RN_TM1_4 NeoPixelBusLg #ifndef WLED_NO_I2S0_PIXELBUS #define B_32_I0_TM1_4 NeoPixelBusLg #endif @@ -222,7 +233,7 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca #endif //Bit Bang theoratically possible, but very undesirable and not needed (no pin restrictions on RMT and I2S) //TM1829 (RGB) -#define B_32_RN_TM2_3 NeoPixelBusLg +#define B_32_RN_TM2_3 NeoPixelBusLg #ifndef WLED_NO_I2S0_PIXELBUS #define B_32_I0_TM2_3 NeoPixelBusLg #endif @@ -231,7 +242,7 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca #endif //Bit Bang theoratically possible, but very undesirable and not needed (no pin restrictions on RMT and I2S) //UCS8903 -#define B_32_RN_UCS_3 NeoPixelBusLg +#define B_32_RN_UCS_3 NeoPixelBusLg #ifndef WLED_NO_I2S0_PIXELBUS #define B_32_I0_UCS_3 NeoPixelBusLg #endif @@ -240,7 +251,7 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca #endif //Bit Bang theoratically possible, but very undesirable and not needed (no pin restrictions on RMT and I2S) //UCS8904 -#define B_32_RN_UCS_4 NeoPixelBusLg +#define B_32_RN_UCS_4 NeoPixelBusLg #ifndef WLED_NO_I2S0_PIXELBUS #define B_32_I0_UCS_4 NeoPixelBusLg #endif