Skip to content

Commit 3668ede

Browse files
authored
Merge pull request #4327 from willmmiles/4312-missing-clock
Fix missing clock setting introduce by #4312
2 parents 9455843 + dcba1aa commit 3668ede

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

wled00/bus_manager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ BusDigital::BusDigital(BusConfig &bc, uint8_t nr, const ColorOrderMap &com)
150150
//_buffering = bc.doubleBuffer;
151151
uint16_t lenToCreate = bc.count;
152152
if (bc.type == TYPE_WS2812_1CH_X3) lenToCreate = NUM_ICS_WS2812_1CH_3X(bc.count); // only needs a third of "RGB" LEDs for NeoPixelBus
153-
_busPtr = PolyBus::create(_iType, _pins, lenToCreate + _skip, nr, _frequencykHz);
153+
_busPtr = PolyBus::create(_iType, _pins, lenToCreate + _skip, nr);
154154
_valid = (_busPtr != nullptr);
155155
DEBUG_PRINTF_P(PSTR("%successfully inited strip %u (len %u) with type %u and pins %u,%u (itype %u). mA=%d/%d\n"), _valid?"S":"Uns", nr, bc.count, bc.type, _pins[0], is2Pin(bc.type)?_pins[1]:255, _iType, _milliAmpsPerLed, _milliAmpsMax);
156156
}
@@ -412,7 +412,7 @@ std::vector<LEDType> BusDigital::getLEDTypes() {
412412

413413
void BusDigital::begin() {
414414
if (!_valid) return;
415-
PolyBus::begin(_busPtr, _iType, _pins);
415+
PolyBus::begin(_busPtr, _iType, _pins, _frequencykHz);
416416
}
417417

418418
void BusDigital::cleanup() {

wled00/bus_wrapper.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ class PolyBus {
336336

337337
// initialize SPI bus speed for DotStar methods
338338
template <class T>
339-
static void beginDotStar(void* busPtr, int8_t sck, int8_t miso, int8_t mosi, int8_t ss, uint16_t clock_kHz = 0U) {
339+
static void beginDotStar(void* busPtr, int8_t sck, int8_t miso, int8_t mosi, int8_t ss, uint16_t clock_kHz /* 0 == use default */) {
340340
T dotStar_strip = static_cast<T>(busPtr);
341341
#ifdef ESP8266
342342
dotStar_strip->Begin();
@@ -363,7 +363,7 @@ class PolyBus {
363363
tm1914_strip->SetPixelSettings(NeoTm1914Settings()); //NeoTm1914_Mode_DinFdinAutoSwitch, NeoTm1914_Mode_DinOnly, NeoTm1914_Mode_FdinOnly
364364
}
365365

366-
static void begin(void* busPtr, uint8_t busType, uint8_t* pins, uint16_t clock_kHz = 0U) {
366+
static void begin(void* busPtr, uint8_t busType, uint8_t* pins, uint16_t clock_kHz /* only used by DotStar */) {
367367
switch (busType) {
368368
case I_NONE: break;
369369
#ifdef ESP8266
@@ -480,7 +480,7 @@ class PolyBus {
480480
}
481481
}
482482

483-
static void* create(uint8_t busType, uint8_t* pins, uint16_t len, uint8_t channel, uint16_t clock_kHz = 0U) {
483+
static void* create(uint8_t busType, uint8_t* pins, uint16_t len, uint8_t channel) {
484484
#if defined(ARDUINO_ARCH_ESP32) && !(defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3))
485485
// NOTE: "channel" is only used on ESP32 (and its variants) for RMT channel allocation
486486
// since 0.15.0-b3 I2S1 is favoured for classic ESP32 and moved to position 0 (channel 0) so we need to subtract 1 for correct RMT allocation

0 commit comments

Comments
 (0)