From 6fb2ce6fa191d4c9d335c5c7f7d374d8de4d5163 Mon Sep 17 00:00:00 2001 From: Brian Bulkowski Date: Mon, 29 Jun 2020 11:17:33 -0700 Subject: [PATCH] Had broken the build for v4.0. Fixed now howpefully still testing --- .../platforms/esp/32/clockless_rmt_esp32.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/components/FastLED-idf/platforms/esp/32/clockless_rmt_esp32.h b/components/FastLED-idf/platforms/esp/32/clockless_rmt_esp32.h index 9039b49..3a58b52 100644 --- a/components/FastLED-idf/platforms/esp/32/clockless_rmt_esp32.h +++ b/components/FastLED-idf/platforms/esp/32/clockless_rmt_esp32.h @@ -279,8 +279,17 @@ protected: for (int i = 0; i < FASTLED_RMT_MAX_CHANNELS; i++) { gOnChannel[i] = NULL; - // -- RMT configuration for transmission + // -- RMT configuration for transmission --- different in different ESP versions +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4,1,0) rmt_config_t rmt_tx = RMT_DEFAULT_CONFIG_TX(mPin, fastled_get_rmt_channel(i) ); +#else + rmt_config_t rmt_tx; + memset(&rmt_tx, 0, sizeof(rmt_tx)); + rmt_tx.channel = fastled_get_rmt_channel(i); + rmt_tx.gpio_num = mPin; + rmt_tx.mem_block_num = 1; + rmt_tx.tx_config.carrier_level = RMT_CARRIER_LEVEL_LOW; +#endif // version before 4.1 rmt_tx.clk_div = DIVIDER; // don't wish to have a carrier applied. Therefore carrier_en is false and the extra parameters don't matter.