fastpath: use i2s#1 for 5th LED pin

use 4 RMT channels, then I2S#1, then RMT 5-8. This allows to have up to 5 "fast" LED pins.

"Even though the ESP32 has 8 channels of RMT hardware, using beyond 4 has shown to cause sending delays." (https://github.com/Makuna/NeoPixelBus/wiki/ESP32-NeoMethods#rmt)
This commit is contained in:
Frank
2023-05-03 00:29:14 +02:00
parent 56b6290fdd
commit 91d36fa269
3 changed files with 22 additions and 2 deletions

View File

@@ -9,6 +9,8 @@
#include "bus_wrapper.h"
#include "bus_manager.h"
//WLEDMM: #define DEBUGOUT(x) netDebugEnabled?NetDebug.print(x):Serial.print(x) not supported in this file as netDebugEnabled not in scope
#if 0
//colors.cpp
uint32_t colorBalanceFromKelvin(uint16_t kelvin, uint32_t rgb);
uint16_t approximateKelvinFromRGB(uint32_t rgb);
@@ -18,7 +20,6 @@ void colorRGBtoRGBW(byte* rgb);
uint8_t realtimeBroadcast(uint8_t type, IPAddress client, uint16_t length, byte *buffer, uint8_t bri=255, bool isRGBW=false);
// enable additional debug output
//WLEDMM: #define DEBUGOUT(x) netDebugEnabled?NetDebug.print(x):Serial.print(x) not supported in this file as netDebugEnabled not in scope
#if defined(WLED_DEBUG_HOST)
#include "net_debug.h"
#define DEBUGOUT NetDebug
@@ -38,6 +39,10 @@ uint8_t realtimeBroadcast(uint8_t type, IPAddress client, uint16_t length, byte
#define DEBUG_PRINTLN(x)
#define DEBUG_PRINTF(x...)
#endif
#else
// WLEDMM use wled.h
#include "wled.h"
#endif
//color mangling macros
#define RGBW32(r,g,b,w) (uint32_t((byte(w) << 24) | (byte(r) << 16) | (byte(g) << 8) | (byte(b))))
@@ -114,7 +119,11 @@ BusDigital::BusDigital(BusConfig &bc, uint8_t nr, const ColorOrderMap &com) : Bu
_busPtr = PolyBus::create(_iType, _pins, lenToCreate, nr);
_valid = (_busPtr != nullptr);
_colorOrder = bc.colorOrder;
DEBUG_PRINTF("%successfully inited strip %u (len %u) with type %u and pins %u,%u (itype %u)\n", _valid?"S":"Uns", nr, _len, bc.type, _pins[0],_pins[1],_iType);
if (_pins[1] != 255) { // WLEDMM USER_PRINTF
USER_PRINTF("%successfully inited strip %u (len %u) with type %u and pins %u,%u (itype %u)\n", _valid?"S":"Uns", nr, _len, bc.type, _pins[0],_pins[1],_iType);
} else {
USER_PRINTF("%successfully inited strip %u (len %u) with type %u and pin %u (itype %u)\n", _valid?"S":"Uns", nr, _len, bc.type, _pins[0],_iType);
}
}
void BusDigital::show() {