Lumitronix_Iflex_Pro_Workshop
Library to interact with the iFlexPro
NeoEsp32RmtMethod.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2 LumitronixIFlex library helper functions for Esp32.
3 
4 A BIG thanks to Andreas Merkle for the investigation and implementation of
5 a workaround to the GCC bug that drops method attributes from template methods
6 
7 Written by Michael C. Miller.
8 
9 I invest time and resources providing this open source code,
10 please support me by dontating (see https://github.com/Makuna)
11 
12 -------------------------------------------------------------------------
13 This file is part of the LUMITRONIX_iFlex_Workshop library.
14 
15 LumitronixIFlexBus is free software: you can redistribute it and/or modify
16 it under the terms of the GNU Lesser General Public License as
17 published by the Free Software Foundation, either version 3 of
18 the License, or (at your option) any later version.
19 
20 LumitronixIFlexBus is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU Lesser General Public License for more details.
24 
25 You should have received a copy of the GNU Lesser General Public
26 License along with LumitronixIFlex. If not, see
27 <http://www.gnu.org/licenses/>.
28 -------------------------------------------------------------------------*/
29 
30 #pragma once
31 
32 #ifdef ARDUINO_ARCH_ESP32
33 
34 /* General Reference documentation for the APIs used in this implementation
35 LOW LEVEL: (what is actually used)
36 DOCS: https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/rmt.html
37 EXAMPLE: https://github.com/espressif/esp-idf/blob/826ff7186ae07dc81e960a8ea09ebfc5304bfb3b/examples/peripherals/rmt_tx/main/rmt_tx_main.c
38 
39 HIGHER LEVEL:
40 NO TRANSLATE SUPPORT so this was not used
41 NOTE: https://github.com/espressif/arduino-esp32/commit/50d142950d229b8fabca9b749dc4a5f2533bc426
42 Esp32-hal-rmt.h
43 Esp32-hal-rmt.c
44 */
45 
46 extern "C"
47 {
48 #include <driver/rmt.h>
49 }
50 
51 #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 3, 0)
52 #define LUMITRONIX_IFLEX_BUS_RMT_INT_FLAGS (ESP_INTR_FLAG_LOWMED)
53 #else
54 #define LUMITRONIX_IFLEX_BUS_RMT_INT_FLAGS (ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_LEVEL1)
55 #endif
56 
57 class NeoEsp32RmtSpeed
58 {
59 public:
60  // ClkDiv of 2 provides for good resolution and plenty of reset resolution; but
61  // a ClkDiv of 1 will provide enough space for the longest reset and does show
62  // little better pulse accuracy
63  const static uint8_t RmtClockDivider = 2;
64 
65  inline constexpr static uint32_t FromNs(uint32_t ns)
66  {
67  return ns / NsPerRmtTick;
68  }
69 
70 protected:
71  const static uint32_t RmtCpu = 80000000L; // 80 mhz RMT clock
72  const static uint32_t NsPerSecond = 1000000000L;
73  const static uint32_t RmtTicksPerSecond = (RmtCpu / RmtClockDivider);
74  const static uint32_t NsPerRmtTick = (NsPerSecond / RmtTicksPerSecond); // about 25
75 
76  static void IRAM_ATTR _translate(const void* src,
77  rmt_item32_t* dest,
78  size_t src_size,
79  size_t wanted_num,
80  size_t* translated_size,
81  size_t* item_num,
82  const uint32_t rmtBit0,
83  const uint32_t rmtBit1,
84  const uint16_t rmtDurationReset);
85 
86 };
87 
88 class NeoEsp32RmtSpeedBase : public NeoEsp32RmtSpeed
89 {
90 public:
91  // this is used rather than the rmt_item32_t as you can't correctly initialize
92  // it as a static constexpr within the template
93  inline constexpr static uint32_t Item32Val(uint16_t nsHigh, uint16_t nsLow)
94  {
95  return (FromNs(nsLow) << 16) | (1 << 15) | (FromNs(nsHigh));
96  }
97 
98  const static rmt_idle_level_t IdleLevel = RMT_IDLE_LEVEL_LOW;
99 };
100 
101 class NeoEsp32RmtInvertedSpeedBase : public NeoEsp32RmtSpeed
102 {
103 public:
104  // this is used rather than the rmt_item32_t as you can't correctly initialize
105  // it as a static constexpr within the template
106  inline constexpr static uint32_t Item32Val(uint16_t nsHigh, uint16_t nsLow)
107  {
108  return (FromNs(nsLow) << 16) | (1 << 31) | (FromNs(nsHigh));
109  }
110 
111  const static rmt_idle_level_t IdleLevel = RMT_IDLE_LEVEL_HIGH;
112 };
113 
114 class NeoEsp32RmtSpeedWs2811 : public NeoEsp32RmtSpeedBase
115 {
116 public:
117  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(300, 950);
118  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(900, 350);
119  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(300000); // 300us
120 
121  static void IRAM_ATTR Translate(const void* src,
122  rmt_item32_t* dest,
123  size_t src_size,
124  size_t wanted_num,
125  size_t* translated_size,
126  size_t* item_num);
127 };
128 
129 class NeoEsp32RmtSpeedWs2812x : public NeoEsp32RmtSpeedBase
130 {
131 public:
132  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(400, 850);
133  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(800, 450);
134  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(300000); // 300us
135 
136  static void IRAM_ATTR Translate(const void* src,
137  rmt_item32_t* dest,
138  size_t src_size,
139  size_t wanted_num,
140  size_t* translated_size,
141  size_t* item_num);
142 };
143 
144 class NeoEsp32RmtSpeedSk6812 : public NeoEsp32RmtSpeedBase
145 {
146 public:
147  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(400, 850);
148  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(800, 450);
149  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(80000); // 80us
150 
151  static void IRAM_ATTR Translate(const void* src,
152  rmt_item32_t* dest,
153  size_t src_size,
154  size_t wanted_num,
155  size_t* translated_size,
156  size_t* item_num);
157 };
158 
159 // normal is inverted signal
160 class NeoEsp32RmtSpeedTm1814 : public NeoEsp32RmtInvertedSpeedBase
161 {
162 public:
163  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(360, 890);
164  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(720, 530);
165  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(200000); // 200us
166 
167  static void IRAM_ATTR Translate(const void* src,
168  rmt_item32_t* dest,
169  size_t src_size,
170  size_t wanted_num,
171  size_t* translated_size,
172  size_t* item_num);
173 };
174 
175 // normal is inverted signal
176 class NeoEsp32RmtSpeedTm1829 : public NeoEsp32RmtInvertedSpeedBase
177 {
178 public:
179  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(300, 900);
180  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(800, 400);
181  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(200000); // 200us
182 
183  static void IRAM_ATTR Translate(const void* src,
184  rmt_item32_t* dest,
185  size_t src_size,
186  size_t wanted_num,
187  size_t* translated_size,
188  size_t* item_num);
189 };
190 
191 // normal is inverted signal
192 class NeoEsp32RmtSpeedTm1914 : public NeoEsp32RmtInvertedSpeedBase
193 {
194 public:
195  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(360, 890);
196  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(720, 530);
197  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(200000); // 200us
198 
199  static void IRAM_ATTR Translate(const void* src,
200  rmt_item32_t* dest,
201  size_t src_size,
202  size_t wanted_num,
203  size_t* translated_size,
204  size_t* item_num);
205 };
206 
207 class NeoEsp32RmtSpeed800Kbps : public NeoEsp32RmtSpeedBase
208 {
209 public:
210  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(400, 850);
211  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(800, 450);
212  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(50000); // 50us
213 
214  static void IRAM_ATTR Translate(const void* src,
215  rmt_item32_t* dest,
216  size_t src_size,
217  size_t wanted_num,
218  size_t* translated_size,
219  size_t* item_num);
220 };
221 
222 class NeoEsp32RmtSpeed400Kbps : public NeoEsp32RmtSpeedBase
223 {
224 public:
225  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(800, 1700);
226  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(1600, 900);
227  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(50000); // 50us
228 
229  static void IRAM_ATTR Translate(const void* src,
230  rmt_item32_t* dest,
231  size_t src_size,
232  size_t wanted_num,
233  size_t* translated_size,
234  size_t* item_num);
235 };
236 
237 class NeoEsp32RmtSpeedApa106 : public NeoEsp32RmtSpeedBase
238 {
239 public:
240  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(350, 1350);
241  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(1350, 350);
242  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(50000); // 50us
243 
244  static void IRAM_ATTR Translate(const void* src,
245  rmt_item32_t* dest,
246  size_t src_size,
247  size_t wanted_num,
248  size_t* translated_size,
249  size_t* item_num);
250 };
251 
252 class NeoEsp32RmtSpeedTx1812 : public NeoEsp32RmtSpeedBase
253 {
254 public:
255  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(300, 600);
256  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(600, 300);
257  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(80000); // 80us
258 
259  static void IRAM_ATTR Translate(const void* src,
260  rmt_item32_t* dest,
261  size_t src_size,
262  size_t wanted_num,
263  size_t* translated_size,
264  size_t* item_num);
265 };
266 
267 class NeoEsp32RmtInvertedSpeedWs2811 : public NeoEsp32RmtInvertedSpeedBase
268 {
269 public:
270  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(300, 950);
271  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(900, 350);
272  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(300000); // 300us
273 
274  static void IRAM_ATTR Translate(const void* src,
275  rmt_item32_t* dest,
276  size_t src_size,
277  size_t wanted_num,
278  size_t* translated_size,
279  size_t* item_num);
280 };
281 
282 class NeoEsp32RmtInvertedSpeedWs2812x : public NeoEsp32RmtInvertedSpeedBase
283 {
284 public:
285  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(400, 850);
286  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(800, 450);
287  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(300000); // 300us
288 
289  static void IRAM_ATTR Translate(const void* src,
290  rmt_item32_t* dest,
291  size_t src_size,
292  size_t wanted_num,
293  size_t* translated_size,
294  size_t* item_num);
295 };
296 
297 class NeoEsp32RmtInvertedSpeedSk6812 : public NeoEsp32RmtInvertedSpeedBase
298 {
299 public:
300  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(400, 850);
301  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(800, 450);
302  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(80000); // 80us
303 
304  static void IRAM_ATTR Translate(const void* src,
305  rmt_item32_t* dest,
306  size_t src_size,
307  size_t wanted_num,
308  size_t* translated_size,
309  size_t* item_num);
310 };
311 
312 // normal is inverted signal
313 class NeoEsp32RmtInvertedSpeedTm1814 : public NeoEsp32RmtSpeedBase
314 {
315 public:
316  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(360, 890);
317  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(720, 530);
318  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(200000); // 200us
319 
320  static void IRAM_ATTR Translate(const void* src,
321  rmt_item32_t* dest,
322  size_t src_size,
323  size_t wanted_num,
324  size_t* translated_size,
325  size_t* item_num);
326 };
327 
328 // normal is inverted signal
329 class NeoEsp32RmtInvertedSpeedTm1829 : public NeoEsp32RmtSpeedBase
330 {
331 public:
332  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(300, 900);
333  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(800, 400);
334  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(200000); // 200us
335 
336  static void IRAM_ATTR Translate(const void* src,
337  rmt_item32_t* dest,
338  size_t src_size,
339  size_t wanted_num,
340  size_t* translated_size,
341  size_t* item_num);
342 };
343 
344 // normal is inverted signal
345 class NeoEsp32RmtInvertedSpeedTm1914 : public NeoEsp32RmtSpeedBase
346 {
347 public:
348  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(360, 890);
349  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(720, 530);
350  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(200000); // 200us
351 
352  static void IRAM_ATTR Translate(const void* src,
353  rmt_item32_t* dest,
354  size_t src_size,
355  size_t wanted_num,
356  size_t* translated_size,
357  size_t* item_num);
358 };
359 
360 class NeoEsp32RmtInvertedSpeed800Kbps : public NeoEsp32RmtInvertedSpeedBase
361 {
362 public:
363  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(400, 850);
364  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(800, 450);
365  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(50000); // 50us
366 
367  static void IRAM_ATTR Translate(const void* src,
368  rmt_item32_t* dest,
369  size_t src_size,
370  size_t wanted_num,
371  size_t* translated_size,
372  size_t* item_num);
373 };
374 
375 class NeoEsp32RmtInvertedSpeed400Kbps : public NeoEsp32RmtInvertedSpeedBase
376 {
377 public:
378  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(800, 1700);
379  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(1600, 900);
380  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(50000); // 50us
381 
382  static void IRAM_ATTR Translate(const void* src,
383  rmt_item32_t* dest,
384  size_t src_size,
385  size_t wanted_num,
386  size_t* translated_size,
387  size_t* item_num);
388 };
389 
390 class NeoEsp32RmtInvertedSpeedApa106 : public NeoEsp32RmtInvertedSpeedBase
391 {
392 public:
393  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(350, 1350);
394  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(1350, 350);
395  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(50000); // 50us
396 
397  static void IRAM_ATTR Translate(const void* src,
398  rmt_item32_t* dest,
399  size_t src_size,
400  size_t wanted_num,
401  size_t* translated_size,
402  size_t* item_num);
403 };
404 
405 class NeoEsp32RmtInvertedSpeedTx1812 : public NeoEsp32RmtInvertedSpeedBase
406 {
407 public:
408  const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(300, 600);
409  const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(600, 300);
410  const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(80000); // 80us
411 
412  static void IRAM_ATTR Translate(const void* src,
413  rmt_item32_t* dest,
414  size_t src_size,
415  size_t wanted_num,
416  size_t* translated_size,
417  size_t* item_num);
418 };
419 
420 class NeoEsp32RmtChannel0
421 {
422 public:
423  NeoEsp32RmtChannel0() {};
424 
425  const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_0;
426 };
427 
428 class NeoEsp32RmtChannel1
429 {
430 public:
431  NeoEsp32RmtChannel1() {};
432 
433  const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_1;
434 };
435 
436 class NeoEsp32RmtChannel2
437 {
438 public:
439  NeoEsp32RmtChannel2() {};
440 
441  const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_2;
442 };
443 
444 class NeoEsp32RmtChannel3
445 {
446 public:
447  NeoEsp32RmtChannel3() {};
448 
449  const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_3;
450 };
451 
452 #if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
453 
454 class NeoEsp32RmtChannel4
455 {
456 public:
457  NeoEsp32RmtChannel4() {};
458 
459  const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_4;
460 };
461 
462 class NeoEsp32RmtChannel5
463 {
464 public:
465  NeoEsp32RmtChannel5() {};
466 
467  const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_5;
468 };
469 
470 class NeoEsp32RmtChannel6
471 {
472 public:
473  NeoEsp32RmtChannel6() {};
474 
475  const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_6;
476 };
477 
478 class NeoEsp32RmtChannel7
479 {
480 public:
481  NeoEsp32RmtChannel7() {};
482 
483  const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_7;
484 };
485 
486 #endif
487 
488 // dynamic channel support
489 class NeoEsp32RmtChannelN
490 {
491 public:
492  NeoEsp32RmtChannelN(NeoBusChannel channel) :
493  RmtChannelNumber(static_cast<rmt_channel_t>(channel))
494  {
495  }
496  NeoEsp32RmtChannelN() = delete; // no default constructor
497 
498  const rmt_channel_t RmtChannelNumber;
499 };
500 
501 template<typename T_SPEED, typename T_CHANNEL> class NeoEsp32RmtMethodBase
502 {
503 public:
504  typedef NeoNoSettings SettingsObject;
505 
506  NeoEsp32RmtMethodBase(uint8_t pin, uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
507  _sizeData(pixelCount * elementSize + settingsSize),
508  _pin(pin)
509  {
510  construct();
511  }
512 
513  NeoEsp32RmtMethodBase(uint8_t pin, uint16_t pixelCount, size_t elementSize, size_t settingsSize, NeoBusChannel channel) :
514  _sizeData(pixelCount* elementSize + settingsSize),
515  _pin(pin),
516  _channel(channel)
517  {
518  construct();
519  }
520 
521  ~NeoEsp32RmtMethodBase()
522  {
523  // wait until the last send finishes before destructing everything
524  // arbitrary time out of 10 seconds
525  ESP_ERROR_CHECK_WITHOUT_ABORT(rmt_wait_tx_done(_channel.RmtChannelNumber, 10000 / portTICK_PERIOD_MS));
526 
527  ESP_ERROR_CHECK(rmt_driver_uninstall(_channel.RmtChannelNumber));
528 
529  gpio_matrix_out(_pin, 0x100, false, false);
530  pinMode(_pin, INPUT);
531 
532  free(_dataEditing);
533  free(_dataSending);
534  }
535 
536 
537  bool IsReadyToUpdate() const
538  {
539  return (ESP_OK == rmt_wait_tx_done(_channel.RmtChannelNumber, 0));
540  }
541 
542  void Initialize()
543  {
544  rmt_config_t config = {};
545 
546  config.rmt_mode = RMT_MODE_TX;
547  config.channel = _channel.RmtChannelNumber;
548  config.gpio_num = static_cast<gpio_num_t>(_pin);
549  config.mem_block_num = 1;
550  config.tx_config.loop_en = false;
551 
552  config.tx_config.idle_output_en = true;
553  config.tx_config.idle_level = T_SPEED::IdleLevel;
554 
555  config.tx_config.carrier_en = false;
556  config.tx_config.carrier_level = RMT_CARRIER_LEVEL_LOW;
557 
558  config.clk_div = T_SPEED::RmtClockDivider;
559 
560  ESP_ERROR_CHECK(rmt_config(&config));
561  ESP_ERROR_CHECK(rmt_driver_install(_channel.RmtChannelNumber, 0, LUMITRONIX_IFLEX_BUS_RMT_INT_FLAGS));
562  ESP_ERROR_CHECK(rmt_translator_init(_channel.RmtChannelNumber, T_SPEED::Translate));
563  }
564 
565  void Update(bool maintainBufferConsistency)
566  {
567  // wait for not actively sending data
568  // this will time out at 10 seconds, an arbitrarily long period of time
569  // and do nothing if this happens
570  if (ESP_OK == ESP_ERROR_CHECK_WITHOUT_ABORT(rmt_wait_tx_done(_channel.RmtChannelNumber, 10000 / portTICK_PERIOD_MS)))
571  {
572  // now start the RMT transmit with the editing buffer before we swap
573  ESP_ERROR_CHECK_WITHOUT_ABORT(rmt_write_sample(_channel.RmtChannelNumber, _dataEditing, _sizeData, false));
574 
575  if (maintainBufferConsistency)
576  {
577  // copy editing to sending,
578  // this maintains the contract that "colors present before will
579  // be the same after", otherwise GetPixelColor will be inconsistent
580  memcpy(_dataSending, _dataEditing, _sizeData);
581  }
582 
583  // swap so the user can modify without affecting the async operation
584  std::swap(_dataSending, _dataEditing);
585  }
586  }
587 
588  bool AlwaysUpdate()
589  {
590  // this method requires update to be called only if changes to buffer
591  return false;
592  }
593 
594  uint8_t* getData() const
595  {
596  return _dataEditing;
597  };
598 
599  size_t getDataSize() const
600  {
601  return _sizeData;
602  }
603 
604  void applySettings([[maybe_unused]] const SettingsObject& settings)
605  {
606  }
607 
608 private:
609  const size_t _sizeData; // Size of '_data*' buffers
610  const uint8_t _pin; // output pin number
611  const T_CHANNEL _channel; // holds instance for multi channel support
612 
613  // Holds data stream which include LED color values and other settings as needed
614  uint8_t* _dataEditing; // exposed for get and set
615  uint8_t* _dataSending; // used for async send using RMT
616 
617 
618  void construct()
619  {
620  _dataEditing = static_cast<uint8_t*>(malloc(_sizeData));
621  // data cleared later in Begin()
622 
623  _dataSending = static_cast<uint8_t*>(malloc(_sizeData));
624  // no need to initialize it, it gets overwritten on every send
625  }
626 };
627 
628 // normal
629 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannelN> NeoEsp32RmtNWs2811Method;
630 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannelN> NeoEsp32RmtNWs2812xMethod;
631 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannelN> NeoEsp32RmtNWs2816Method;
632 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannelN> NeoEsp32RmtNSk6812Method;
633 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannelN> NeoEsp32RmtNTm1814Method;
634 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannelN> NeoEsp32RmtNTm1829Method;
635 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannelN> NeoEsp32RmtNTm1914Method;
636 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannelN> NeoEsp32RmtNApa106Method;
637 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannelN> NeoEsp32RmtNTx1812Method;
638 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannelN> NeoEsp32RmtN800KbpsMethod;
639 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannelN> NeoEsp32RmtN400KbpsMethod;
640 
641 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel0> NeoEsp32Rmt0Ws2811Method;
642 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel0> NeoEsp32Rmt0Ws2812xMethod;
643 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel0> NeoEsp32Rmt0Ws2816Method;
644 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel0> NeoEsp32Rmt0Sk6812Method;
645 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1814Method;
646 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1829Method;
647 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1914Method;
648 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel0> NeoEsp32Rmt0Apa106Method;
649 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tx1812Method;
650 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel0> NeoEsp32Rmt0800KbpsMethod;
651 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel0> NeoEsp32Rmt0400KbpsMethod;
652 
653 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel1> NeoEsp32Rmt1Ws2811Method;
654 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel1> NeoEsp32Rmt1Ws2812xMethod;
655 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel1> NeoEsp32Rmt1Ws2816Method;
656 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel1> NeoEsp32Rmt1Sk6812Method;
657 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1814Method;
658 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1829Method;
659 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1914Method;
660 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel1> NeoEsp32Rmt1Apa106Method;
661 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tx1812Method;
662 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel1> NeoEsp32Rmt1800KbpsMethod;
663 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel1> NeoEsp32Rmt1400KbpsMethod;
664 
665 #if !defined(CONFIG_IDF_TARGET_ESP32C3)
666 
667 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel2> NeoEsp32Rmt2Ws2811Method;
668 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel2> NeoEsp32Rmt2Ws2812xMethod;
669 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel2> NeoEsp32Rmt2Ws2816Method;
670 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel2> NeoEsp32Rmt2Sk6812Method;
671 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1814Method;
672 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1829Method;
673 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1914Method;
674 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel2> NeoEsp32Rmt2Apa106Method;
675 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tx1812Method;
676 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel2> NeoEsp32Rmt2800KbpsMethod;
677 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel2> NeoEsp32Rmt2400KbpsMethod;
678 
679 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel3> NeoEsp32Rmt3Ws2811Method;
680 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel3> NeoEsp32Rmt3Ws2812xMethod;
681 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel3> NeoEsp32Rmt3Ws2816Method;
682 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel3> NeoEsp32Rmt3Sk6812Method;
683 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1814Method;
684 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1829Method;
685 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1914Method;
686 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel3> NeoEsp32Rmt3Apa106Method;
687 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tx1812Method;
688 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel3> NeoEsp32Rmt3800KbpsMethod;
689 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel3> NeoEsp32Rmt3400KbpsMethod;
690 
691 #if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32S3)
692 
693 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel4> NeoEsp32Rmt4Ws2811Method;
694 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel4> NeoEsp32Rmt4Ws2812xMethod;
695 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel4> NeoEsp32Rmt4Ws2816Method;
696 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel4> NeoEsp32Rmt4Sk6812Method;
697 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tm1814Method;
698 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tm1829Method;
699 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tm1914Method;
700 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel4> NeoEsp32Rmt4Apa106Method;
701 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tx1812Method;
702 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel4> NeoEsp32Rmt4800KbpsMethod;
703 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel4> NeoEsp32Rmt4400KbpsMethod;
704 
705 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel5> NeoEsp32Rmt5Ws2811Method;
706 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel5> NeoEsp32Rmt5Ws2812xMethod;
707 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel5> NeoEsp32Rmt5Ws2816Method;
708 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel5> NeoEsp32Rmt5Sk6812Method;
709 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1814Method;
710 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1829Method;
711 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1914Method;
712 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel5> NeoEsp32Rmt5Apa106Method;
713 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tx1812Method;
714 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel5> NeoEsp32Rmt5800KbpsMethod;
715 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel5> NeoEsp32Rmt5400KbpsMethod;
716 
717 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel6> NeoEsp32Rmt6Ws2811Method;
718 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel6> NeoEsp32Rmt6Ws2812xMethod;
719 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel6> NeoEsp32Rmt6Ws2816Method;
720 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel6> NeoEsp32Rmt6Sk6812Method;
721 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1814Method;
722 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1829Method;
723 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1914Method;
724 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel6> NeoEsp32Rmt6Apa106Method;
725 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tx1812Method;
726 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel6> NeoEsp32Rmt6800KbpsMethod;
727 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel6> NeoEsp32Rmt6400KbpsMethod;
728 
729 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel7> NeoEsp32Rmt7Ws2811Method;
730 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel7> NeoEsp32Rmt7Ws2812xMethod;
731 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel7> NeoEsp32Rmt7Ws2816Method;
732 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel7> NeoEsp32Rmt7Sk6812Method;
733 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1814Method;
734 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1829Method;
735 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1914Method;
736 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel7> NeoEsp32Rmt7Apa106Method;
737 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tx1812Method;
738 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel7> NeoEsp32Rmt7800KbpsMethod;
739 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel7> NeoEsp32Rmt7400KbpsMethod;
740 
741 #endif // !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32S3)
742 #endif // !defined(CONFIG_IDF_TARGET_ESP32C3)
743 
744 // inverted
745 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannelN> NeoEsp32RmtNWs2811InvertedMethod;
746 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannelN> NeoEsp32RmtNWs2812xInvertedMethod;
747 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannelN> NeoEsp32RmtNWs2816InvertedMethod;
748 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannelN> NeoEsp32RmtNSk6812InvertedMethod;
749 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannelN> NeoEsp32RmtNTm1814InvertedMethod;
750 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannelN> NeoEsp32RmtNTm1829InvertedMethod;
751 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannelN> NeoEsp32RmtNTm1914InvertedMethod;
752 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannelN> NeoEsp32RmtNApa106InvertedMethod;
753 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannelN> NeoEsp32RmtNTx1812InvertedMethod;
754 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannelN> NeoEsp32RmtN800KbpsInvertedMethod;
755 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannelN> NeoEsp32RmtN400KbpsInvertedMethod;
756 
757 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel0> NeoEsp32Rmt0Ws2811InvertedMethod;
758 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel0> NeoEsp32Rmt0Ws2812xInvertedMethod;
759 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel0> NeoEsp32Rmt0Ws2816InvertedMethod;
760 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel0> NeoEsp32Rmt0Sk6812InvertedMethod;
761 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1814InvertedMethod;
762 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1829InvertedMethod;
763 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1914InvertedMethod;
764 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel0> NeoEsp32Rmt0Apa106InvertedMethod;
765 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tx1812InvertedMethod;
766 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel0> NeoEsp32Rmt0800KbpsInvertedMethod;
767 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel0> NeoEsp32Rmt0400KbpsInvertedMethod;
768 
769 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel1> NeoEsp32Rmt1Ws2811InvertedMethod;
770 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel1> NeoEsp32Rmt1Ws2812xInvertedMethod;
771 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel1> NeoEsp32Rmt1Ws2816InvertedMethod;
772 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel1> NeoEsp32Rmt1Sk6812InvertedMethod;
773 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1814InvertedMethod;
774 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1829InvertedMethod;
775 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1914InvertedMethod;
776 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel1> NeoEsp32Rmt1Apa106InvertedMethod;
777 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tx1812InvertedMethod;
778 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel1> NeoEsp32Rmt1800KbpsInvertedMethod;
779 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel1> NeoEsp32Rmt1400KbpsInvertedMethod;
780 
781 #if !defined(CONFIG_IDF_TARGET_ESP32C3)
782 
783 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel2> NeoEsp32Rmt2Ws2811InvertedMethod;
784 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel2> NeoEsp32Rmt2Ws2812xInvertedMethod;
785 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel2> NeoEsp32Rmt2Ws2816InvertedMethod;
786 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel2> NeoEsp32Rmt2Sk6812InvertedMethod;
787 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1814InvertedMethod;
788 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1829InvertedMethod;
789 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1914InvertedMethod;
790 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel2> NeoEsp32Rmt2Apa106InvertedMethod;
791 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tx1812InvertedMethod;
792 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel2> NeoEsp32Rmt2800KbpsInvertedMethod;
793 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel2> NeoEsp32Rmt2400KbpsInvertedMethod;
794 
795 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel3> NeoEsp32Rmt3Ws2811InvertedMethod;
796 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel3> NeoEsp32Rmt3Ws2812xInvertedMethod;
797 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel3> NeoEsp32Rmt3Ws2816InvertedMethod;
798 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel3> NeoEsp32Rmt3Sk6812InvertedMethod;
799 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1814InvertedMethod;
800 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1829InvertedMethod;
801 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1914InvertedMethod;
802 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel3> NeoEsp32Rmt3Apa106InvertedMethod;
803 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tx1812InvertedMethod;
804 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel3> NeoEsp32Rmt3800KbpsInvertedMethod;
805 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel3> NeoEsp32Rmt3400KbpsInvertedMethod;
806 
807 #if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32S3)
808 
809 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel4> NeoEsp32Rmt4Ws2811InvertedMethod;
810 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel4> NeoEsp32Rmt4Ws2812xInvertedMethod;
811 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel4> NeoEsp32Rmt4Ws2816InvertedMethod;
812 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel4> NeoEsp32Rmt4Sk6812InvertedMethod;
813 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tm1814InvertedMethod;
814 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tm1829InvertedMethod;
815 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tm1914InvertedMethod;
816 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel4> NeoEsp32Rmt4Apa106InvertedMethod;
817 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tx1812InvertedMethod;
818 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel4> NeoEsp32Rmt4800KbpsInvertedMethod;
819 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel4> NeoEsp32Rmt4400KbpsInvertedMethod;
820 
821 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel5> NeoEsp32Rmt5Ws2811InvertedMethod;
822 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel5> NeoEsp32Rmt5Ws2812xInvertedMethod;
823 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel5> NeoEsp32Rmt5Ws2816InvertedMethod;
824 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel5> NeoEsp32Rmt5Sk6812InvertedMethod;
825 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1814InvertedMethod;
826 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1829InvertedMethod;
827 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1914InvertedMethod;
828 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel5> NeoEsp32Rmt5Apa106InvertedMethod;
829 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tx1812InvertedMethod;
830 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel5> NeoEsp32Rmt5800KbpsInvertedMethod;
831 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel5> NeoEsp32Rmt5400KbpsInvertedMethod;
832 
833 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel6> NeoEsp32Rmt6Ws2811InvertedMethod;
834 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel6> NeoEsp32Rmt6Ws2812xInvertedMethod;
835 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel6> NeoEsp32Rmt6Ws2816InvertedMethod;
836 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel6> NeoEsp32Rmt6Sk6812InvertedMethod;
837 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1814InvertedMethod;
838 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1829InvertedMethod;
839 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1914InvertedMethod;
840 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel6> NeoEsp32Rmt6Apa106InvertedMethod;
841 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tx1812InvertedMethod;
842 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel6> NeoEsp32Rmt6800KbpsInvertedMethod;
843 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel6> NeoEsp32Rmt6400KbpsInvertedMethod;
844 
845 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel7> NeoEsp32Rmt7Ws2811InvertedMethod;
846 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel7> NeoEsp32Rmt7Ws2812xInvertedMethod;
847 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel7> NeoEsp32Rmt7Ws2816InvertedMethod;
848 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel7> NeoEsp32Rmt7Sk6812InvertedMethod;
849 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1814InvertedMethod;
850 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1829InvertedMethod;
851 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1914InvertedMethod;
852 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel7> NeoEsp32Rmt7Apa106InvertedMethod;
853 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tx1812InvertedMethod;
854 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel7> NeoEsp32Rmt7800KbpsInvertedMethod;
855 typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel7> NeoEsp32Rmt7400KbpsInvertedMethod;
856 
857 #endif // !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32S3)
858 #endif // !defined(CONFIG_IDF_TARGET_ESP32C3)
859 
860 
861 #if defined(LUMITRONIX_IFLEX_ESP32_RMT_DEFAULT) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
862 
863 // Normally I2s method is the default, defining LUMITRONIX_IFLEX_ESP32_RMT_DEFAULT
864 // will switch to use RMT as the default method
865 // The ESP32S2 & ESP32C3 will always defualt to RMT
866 
867 #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
868 
869 // RMT channel 1 method is the default method for Esp32S2 & Esp32C3
870 typedef NeoEsp32Rmt1Ws2812xMethod NeoWs2813Method;
871 typedef NeoEsp32Rmt1Ws2812xMethod NeoWs2812xMethod;
872 typedef NeoEsp32Rmt1800KbpsMethod NeoWs2812Method;
873 typedef NeoEsp32Rmt1Ws2812xMethod NeoWs2811Method;
874 typedef NeoEsp32Rmt1Ws2812xMethod NeoWs2816Method;
875 typedef NeoEsp32Rmt1Sk6812Method NeoSk6812Method;
876 typedef NeoEsp32Rmt1Tm1814Method NeoTm1814Method;
877 typedef NeoEsp32Rmt1Tm1829Method NeoTm1829Method;
878 typedef NeoEsp32Rmt1Tm1914Method NeoTm1914Method;
879 typedef NeoEsp32Rmt1Sk6812Method NeoLc8812Method;
880 typedef NeoEsp32Rmt1Apa106Method NeoApa106Method;
881 typedef NeoEsp32Rmt1Tx1812Method NeoTx1812Method;
882 
883 typedef NeoEsp32Rmt1Ws2812xMethod Neo800KbpsMethod;
884 typedef NeoEsp32Rmt1400KbpsMethod Neo400KbpsMethod;
885 
886 typedef NeoEsp32Rmt1Ws2812xInvertedMethod NeoWs2813InvertedMethod;
887 typedef NeoEsp32Rmt1Ws2812xInvertedMethod NeoWs2812xInvertedMethod;
888 typedef NeoEsp32Rmt1Ws2812xInvertedMethod NeoWs2811InvertedMethod;
889 typedef NeoEsp32Rmt1800KbpsInvertedMethod NeoWs2812InvertedMethod;
890 typedef NeoEsp32Rmt1Ws2812xInvertedMethod NeoWs2816InvertedMethod;
891 typedef NeoEsp32Rmt1Sk6812InvertedMethod NeoSk6812InvertedMethod;
892 typedef NeoEsp32Rmt1Tm1814InvertedMethod NeoTm1814InvertedMethod;
893 typedef NeoEsp32Rmt1Tm1829InvertedMethod NeoTm1829InvertedMethod;
894 typedef NeoEsp32Rmt1Tm1914InvertedMethod NeoTm1914InvertedMethod;
895 typedef NeoEsp32Rmt1Sk6812InvertedMethod NeoLc8812InvertedMethod;
896 typedef NeoEsp32Rmt1Apa106InvertedMethod NeoApa106InvertedMethod;
897 typedef NeoEsp32Rmt1Tx1812InvertedMethod NeoTx1812InvertedMethod;
898 
899 typedef NeoEsp32Rmt1Ws2812xInvertedMethod Neo800KbpsInvertedMethod;
900 typedef NeoEsp32Rmt1400KbpsInvertedMethod Neo400KbpsInvertedMethod;
901 
902 #else // defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
903 
904 // RMT channel 6 method is the default method for Esp32
905 typedef NeoEsp32Rmt6Ws2812xMethod NeoWs2813Method;
906 typedef NeoEsp32Rmt6Ws2812xMethod NeoWs2812xMethod;
907 typedef NeoEsp32Rmt6800KbpsMethod NeoWs2812Method;
908 typedef NeoEsp32Rmt6Ws2812xMethod NeoWs2811Method;
909 typedef NeoEsp32Rmt6Ws2812xMethod NeoWs2816Method;
910 typedef NeoEsp32Rmt6Sk6812Method NeoSk6812Method;
911 typedef NeoEsp32Rmt6Tm1814Method NeoTm1814Method;
912 typedef NeoEsp32Rmt6Tm1829Method NeoTm1829Method;
913 typedef NeoEsp32Rmt6Tm1914Method NeoTm1914Method;
914 typedef NeoEsp32Rmt6Sk6812Method NeoLc8812Method;
915 typedef NeoEsp32Rmt6Apa106Method NeoApa106Method;
916 typedef NeoEsp32Rmt6Tx1812Method NeoTx1812Method;
917 
918 typedef NeoEsp32Rmt6Ws2812xMethod Neo800KbpsMethod;
919 typedef NeoEsp32Rmt6400KbpsMethod Neo400KbpsMethod;
920 
921 typedef NeoEsp32Rmt6Ws2812xInvertedMethod NeoWs2813InvertedMethod;
922 typedef NeoEsp32Rmt6Ws2812xInvertedMethod NeoWs2812xInvertedMethod;
923 typedef NeoEsp32Rmt6Ws2812xInvertedMethod NeoWs2811InvertedMethod;
924 typedef NeoEsp32Rmt6800KbpsInvertedMethod NeoWs2812InvertedMethod;
925 typedef NeoEsp32Rmt6Ws2812xInvertedMethod NeoWs2816InvertedMethod;
926 typedef NeoEsp32Rmt6Sk6812InvertedMethod NeoSk6812InvertedMethod;
927 typedef NeoEsp32Rmt6Tm1814InvertedMethod NeoTm1814InvertedMethod;
928 typedef NeoEsp32Rmt6Tm1829InvertedMethod NeoTm1829InvertedMethod;
929 typedef NeoEsp32Rmt6Tm1914InvertedMethod NeoTm1914InvertedMethod;
930 typedef NeoEsp32Rmt6Sk6812InvertedMethod NeoLc8812InvertedMethod;
931 typedef NeoEsp32Rmt6Apa106InvertedMethod NeoApa106InvertedMethod;
932 typedef NeoEsp32Rmt6Tx1812InvertedMethod NeoTx1812InvertedMethod;
933 
934 typedef NeoEsp32Rmt6Ws2812xInvertedMethod Neo800KbpsInvertedMethod;
935 typedef NeoEsp32Rmt6400KbpsInvertedMethod Neo400KbpsInvertedMethod;
936 
937 #endif // defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3)
938 
939 #endif // defined(LUMITRONIX_IFLEX_ESP32_RMT_DEFAULT) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3)
940 
941 #endif
NeoBusChannel
Definition: NeoBusChannel.h:12
Definition: NeoSettings.h:29