Lumitronix_Iflex_Pro_Workshop
Library to interact with the iFlexPro
NeoNrf52xMethod.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2 LumitronixIFlex library helper classes for Nrf52* MCUs.
3 Nano 33 BLE
4 
5 Written by Michael C. Miller.
6 
7 I invest time and resources providing this open source code,
8 please support me by dontating (see https://github.com/Makuna)
9 
10 -------------------------------------------------------------------------
11 This file is part of the LUMITRONIX_iFlex_Workshop library.
12 The contents of this file were taken from the Adafruit LumitronixIFlex library
13 and modified only to fit within individual calling functions.
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 #if defined(ARDUINO_ARCH_NRF52840)
33 
34 const uint16_t c_dmaBytesPerDataByte = 8 * sizeof(nrf_pwm_values_common_t); // bits * bytes to represent pulse
35 
36 // for Bit* variables
37 // count 1 = 0.0625us, so max count (32768) is 2048us
38 
39 class NeoNrf52xPwmSpeedWs2811
40 {
41 public:
42  const static uint32_t CountTop = 20UL; // 1.25us
43  const static nrf_pwm_values_common_t Bit0 = 5 | 0x8000; // ~0.3us
44  const static nrf_pwm_values_common_t Bit1 = 14 | 0x8000; // ~0.9us
45  const static nrf_pwm_values_common_t BitReset = 0x8000; // LOW
46  const static uint16_t CountReset = 240; // 300 us / 1.25us
47  const static PinStatus IdleLevel = LOW;
48 };
49 
50 class NeoNrf52xPwmSpeedWs2812x
51 {
52 public:
53  const static uint32_t CountTop = 20UL; // 1.25us
54  const static nrf_pwm_values_common_t Bit0 = 6 | 0x8000; // ~0.4us
55  const static nrf_pwm_values_common_t Bit1 = 13 | 0x8000; // ~0.8us
56  const static nrf_pwm_values_common_t BitReset = 0x8000; // LOW
57  const static uint32_t CountReset = 240 ; // 300us / 1.25us pulse width
58  const static PinStatus IdleLevel = LOW;
59 };
60 
61 class NeoNrf52xPwmSpeedSk6812
62 {
63 public:
64  const static uint32_t CountTop = 20UL; // 1.25us
65  const static nrf_pwm_values_common_t Bit0 = 6 | 0x8000; // ~0.4us
66  const static nrf_pwm_values_common_t Bit1 = 13 | 0x8000; // ~0.8us
67  const static nrf_pwm_values_common_t BitReset = 0x8000; // LOW
68  const static uint32_t CountReset = 64; // 80us / 1.25us pulse width
69  const static PinStatus IdleLevel = LOW;
70 };
71 
72 class NeoNrf52xPwmSpeedTm1814
73 {
74 public:
75  const static uint32_t CountTop = 20UL; // 1.25us
76  const static nrf_pwm_values_common_t Bit0 = 5; // ~0.3us
77  const static nrf_pwm_values_common_t Bit1 = 12; // ~0.7us
78  const static nrf_pwm_values_common_t BitReset = 0x0000; // HIGH
79  const static uint32_t CountReset = 160; // 200us / 1.25us pulse width
80  const static PinStatus IdleLevel = HIGH;
81 };
82 
83 class NeoNrf52xPwmSpeedTm1829
84 {
85 public:
86  const static uint32_t CountTop = 20UL; // 1.25us
87  const static nrf_pwm_values_common_t Bit0 = 5; // ~0.3us
88  const static nrf_pwm_values_common_t Bit1 = 13 | 0x8000; // ~0.8us
89  const static nrf_pwm_values_common_t BitReset = 0x0000; // HIGH
90  const static uint32_t CountReset = 160; // 200us / 1.25us pulse width
91  const static PinStatus IdleLevel = HIGH;
92 };
93 
94 class NeoNrf52xPwmSpeedTm1914
95 {
96 public:
97  const static uint32_t CountTop = 20UL; // 1.25us
98  const static nrf_pwm_values_common_t Bit0 = 5; // ~0.3us
99  const static nrf_pwm_values_common_t Bit1 = 12; // ~0.7us
100  const static nrf_pwm_values_common_t BitReset = 0x0000; // HIGH
101  const static uint32_t CountReset = 160; // 200us / 1.25us pulse width
102  const static PinStatus IdleLevel = HIGH;
103 };
104 
105 class NeoNrf52xPwmSpeed800Kbps
106 {
107 public:
108  const static uint32_t CountTop = 20UL; // 1.25us
109  const static nrf_pwm_values_common_t Bit0 = 6 | 0x8000; // ~0.4us
110  const static nrf_pwm_values_common_t Bit1 = 13 | 0x8000; // ~0.8us
111  const static nrf_pwm_values_common_t BitReset = 0x8000; // LOW
112  const static uint32_t CountReset = 40; // 50us / 1.25us pulse width
113  const static PinStatus IdleLevel = LOW;
114 };
115 
116 class NeoNrf52xPwmSpeed400Kbps
117 {
118 public:
119  const static uint32_t CountTop = 40UL; // 2.5us
120  const static nrf_pwm_values_common_t Bit0 = 13 | 0x8000; // ~0.8us
121  const static nrf_pwm_values_common_t Bit1 = 26 | 0x8000; // ~1.6us
122  const static nrf_pwm_values_common_t BitReset = 0x8000; // LOW
123  const static uint16_t CountReset = 20; // 50 us / 2.5us
124  const static PinStatus IdleLevel = LOW;
125 };
126 
127 // count 1 = 0.0625us, so max count (32768) is 2048us
128 class NeoNrf52xPwmSpeedApa106
129 {
130 public:
131  const static uint32_t CountTop = 26UL; // ~1.525us (target is 1.65us)
132  const static nrf_pwm_values_common_t Bit0 = 6 | 0x8000; // ~0.375us (target is 0.35)
133  const static nrf_pwm_values_common_t Bit1 = 21 | 0x8000; // ~1.3125us (target is 1.350)
134  const static nrf_pwm_values_common_t BitReset = 0x8000; // LOW
135  const static uint32_t CountReset = 40; // 50us / 1.25us pulse width
136  const static PinStatus IdleLevel = LOW;
137 };
138 
139 class NeoNrf52xPwmSpeedTx1812
140 {
141 public:
142  const static uint32_t CountTop = 14UL; // ~0.875us (target is 0.9us)
143  const static nrf_pwm_values_common_t Bit0 = 5 | 0x8000; // ~0.3125us (target is 0.3)
144  const static nrf_pwm_values_common_t Bit1 = 10 | 0x8000; // ~0.625us (target is 0.6)
145  const static nrf_pwm_values_common_t BitReset = 0x8000; // LOW
146  const static uint32_t CountReset = 228; // 200us / 0.875us pulse width
147  const static PinStatus IdleLevel = LOW;
148 };
149 
150 class NeoNrf52xPwmInvertedSpeedWs2811
151 {
152 public:
153  const static uint32_t CountTop = 20UL; // 1.25us
154  const static nrf_pwm_values_common_t Bit0 = 5; // ~0.3us
155  const static nrf_pwm_values_common_t Bit1 = 14; // ~0.9us
156  const static nrf_pwm_values_common_t BitReset = 0x0000; // HIGH
157  const static uint16_t CountReset = 240; // 300 us / 1.25us
158  const static PinStatus IdleLevel = HIGH;
159 };
160 
161 class NeoNrf52xPwmInvertedSpeedWs2812x
162 {
163 public:
164  const static uint32_t CountTop = 20UL; // 1.25us
165  const static nrf_pwm_values_common_t Bit0 = 6; // ~0.4us
166  const static nrf_pwm_values_common_t Bit1 = 13; // ~0.8us
167  const static nrf_pwm_values_common_t BitReset = 0x0000; // HIGH
168  const static uint32_t CountReset = 240; // 300us / 1.25us pulse width
169  const static PinStatus IdleLevel = HIGH;
170 };
171 
172 class NeoNrf52xPwmInvertedSpeedSk6812
173 {
174 public:
175  const static uint32_t CountTop = 20UL; // 1.25us
176  const static nrf_pwm_values_common_t Bit0 = 6; // ~0.4us
177  const static nrf_pwm_values_common_t Bit1 = 13; // ~0.8us
178  const static nrf_pwm_values_common_t BitReset = 0x0000; // HIGH
179  const static uint32_t CountReset = 64; // 80us / 1.25us pulse width
180  const static PinStatus IdleLevel = HIGH;
181 };
182 
183 class NeoNrf52xPwmInvertedSpeedTm1814
184 {
185 public:
186  const static uint32_t CountTop = 20UL; // 1.25us
187  const static nrf_pwm_values_common_t Bit0 = 5 | 0x8000; // ~0.3us
188  const static nrf_pwm_values_common_t Bit1 = 12 | 0x8000; // ~0.7us
189  const static nrf_pwm_values_common_t BitReset = 0x8000; // LOW
190  const static uint32_t CountReset = 160; // 200us / 1.25us pulse width
191  const static PinStatus IdleLevel = LOW;
192 };
193 
194 class NeoNrf52xPwmInvertedSpeedTm1829
195 {
196 public:
197  const static uint32_t CountTop = 20UL; // 1.25us
198  const static nrf_pwm_values_common_t Bit0 = 5 | 0x8000; // ~0.3us
199  const static nrf_pwm_values_common_t Bit1 = 13; // ~0.8us
200  const static nrf_pwm_values_common_t BitReset = 0x8000; // LOW
201  const static uint32_t CountReset = 160; // 200us / 1.25us pulse width
202  const static PinStatus IdleLevel = LOW;
203 };
204 
205 class NeoNrf52xPwmInvertedSpeedTm1914
206 {
207 public:
208  const static uint32_t CountTop = 20UL; // 1.25us
209  const static nrf_pwm_values_common_t Bit0 = 5 | 0x8000; // ~0.3us
210  const static nrf_pwm_values_common_t Bit1 = 12 | 0x8000; // ~0.7us
211  const static nrf_pwm_values_common_t BitReset = 0x8000; // LOW
212  const static uint32_t CountReset = 160; // 200us / 1.25us pulse width
213  const static PinStatus IdleLevel = LOW;
214 };
215 
216 class NeoNrf52xPwmInvertedSpeed800Kbps
217 {
218 public:
219  const static uint32_t CountTop = 20UL; // 1.25us
220  const static nrf_pwm_values_common_t Bit0 = 6; // ~0.4us
221  const static nrf_pwm_values_common_t Bit1 = 13; // ~0.8us
222  const static nrf_pwm_values_common_t BitReset = 0x0000; // HIGH
223  const static uint32_t CountReset = 40; // 50us / 1.25us pulse width
224  const static PinStatus IdleLevel = HIGH;
225 };
226 
227 class NeoNrf52xPwmInvertedSpeed400Kbps
228 {
229 public:
230  const static uint32_t CountTop = 40UL; // 2.5us
231  const static nrf_pwm_values_common_t Bit0 = 13; // ~0.8us
232  const static nrf_pwm_values_common_t Bit1 = 26; // ~1.6us
233  const static nrf_pwm_values_common_t BitReset = 0x0000; // HIGH
234  const static uint16_t CountReset = 20; // 50 us / 2.5us
235  const static PinStatus IdleLevel = HIGH;
236 };
237 
238 class NeoNrf52xPwmInvertedSpeedApa106
239 {
240 public:
241  const static uint32_t CountTop = 26UL; // ~1.525us (target is 1.65us)
242  const static nrf_pwm_values_common_t Bit0 = 6; // ~0.375us (target is 0.35)
243  const static nrf_pwm_values_common_t Bit1 = 21; // ~1.3125us (target is 1.350)
244  const static nrf_pwm_values_common_t BitReset = 0x0000; // HIGH
245  const static uint32_t CountReset = 40; // 50us / 1.25us pulse width
246  const static PinStatus IdleLevel = HIGH;
247 };
248 
249 class NeoNrf52xPwmInvertedSpeedTx1812
250 {
251 public:
252  const static uint32_t CountTop = 14UL; // ~0.875us (target is 0.9us)
253  const static nrf_pwm_values_common_t Bit0 = 5; // ~0.3125us (target is 0.3)
254  const static nrf_pwm_values_common_t Bit1 = 10; // ~0.625us (target is 0.6)
255  const static nrf_pwm_values_common_t BitReset = 0x0000; // HIGH
256  const static uint32_t CountReset = 228; // 200us / 0.875us pulse width
257  const static PinStatus IdleLevel = HIGH;
258 };
259 
260 class NeoNrf52xPwm0
261 {
262 public:
263  NeoNrf52xPwm0() {};
264 
265  inline static NRF_PWM_Type* Pwm()
266  {
267  return NRF_PWM0;
268  }
269 };
270 
271 class NeoNrf52xPwm1
272 {
273 public:
274  NeoNrf52xPwm1() {};
275 
276  inline static NRF_PWM_Type* Pwm()
277  {
278  return NRF_PWM1;
279  }
280 };
281 
282 class NeoNrf52xPwm2
283 {
284 public:
285  NeoNrf52xPwm2() {};
286 
287  inline static NRF_PWM_Type* Pwm()
288  {
289  return NRF_PWM2;
290  }
291 };
292 
293 #if defined(NRF_PWM3)
294 class NeoNrf52xPwm3
295 {
296 public:
297  NeoNrf52xPwm3() {};
298 
299  inline static NRF_PWM_Type* Pwm()
300  {
301  return NRF_PWM3;
302  }
303 };
304 #endif
305 
306 // dynamic channel support
307 class NeoNrf52xPwmN
308 {
309 public:
310  NeoNrf52xPwmN(NeoBusChannel channel)
311  {
312  NRF_PWM_Type* PWM[] = {
313  NRF_PWM0,
314  NRF_PWM1,
315  NRF_PWM2
316 #ifdef NRF_PWM3
317  ,NRF_PWM3
318 #endif
319  };
320  _pwm = PWM[channel];
321  }
322 
323  inline NRF_PWM_Type* Pwm() const
324  {
325  return _pwm;
326  }
327 
328 protected:
329  NRF_PWM_Type* _pwm;
330 
331  NeoNrf52xPwmN() {};
332 };
333 
334 template<typename T_SPEED, typename T_BUS> class NeoNrf52xMethodBase
335 {
336 public:
337  typedef NeoNoSettings SettingsObject;
338 
339  NeoNrf52xMethodBase(uint8_t pin, uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
340  _sizeData(pixelCount * elementSize + settingsSize),
341  _pin(pin)
342  {
343  construct();
344  }
345 
346  NeoNrf52xMethodBase(uint8_t pin, uint16_t pixelCount, size_t elementSize, size_t settingsSize, NeoBusChannel channel) :
347  _sizeData(pixelCount* elementSize + settingsSize),
348  _pin(pin),
349  _bus(channel)
350  {
351  construct();
352  }
353 
354  ~NeoNrf52xMethodBase()
355  {
356  while (!IsReadyToUpdate())
357  {
358  yield();
359  }
360 
361  dmaDeinit();
362 
363  pinMode(_pin, INPUT);
364 
365  free(_data);
366  free(_dmaBuffer);
367  }
368 
369  bool IsReadyToUpdate() const
370  {
371  return (_bus.Pwm()->EVENTS_STOPPED);
372  }
373 
374  void Initialize()
375  {
376  digitalWrite(_pin, T_SPEED::IdleLevel);
377 
378  dmaInit();
379 
380  // must force a first update so the EVENTS_SEQEND gets set as
381  // you can't set it manually
382  FillBuffer();
383  dmaStart();
384  }
385 
386  void Update(bool)
387  {
388  // Data latch = 50+ microsecond pause in the output stream. Rather than
389  // put a delay at the end of the function, the ending time is noted and
390  // the function will simply hold off (if needed) on issuing the
391  // subsequent round of data until the latch time has elapsed. This
392  // allows the mainline code to start generating the next frame of data
393  // rather than stalling for the latch.
394  while (!IsReadyToUpdate())
395  {
396  yield(); // allows for system yield if needed
397  }
398 
399  FillBuffer();
400  dmaStart();
401  }
402 
403  bool AlwaysUpdate()
404  {
405  // this method requires update to be called only if changes to buffer
406  return false;
407  }
408 
409  uint8_t* getData() const
410  {
411  return _data;
412  };
413 
414  size_t getDataSize() const
415  {
416  return _sizeData;
417  };
418 
419  void applySettings([[maybe_unused]] const SettingsObject& settings)
420  {
421  }
422 
423 private:
424  const size_t _sizeData; // Size of '_data' buffer below
425  const uint8_t _pin; // output pin number
426  const T_BUS _bus; // holds instance for multi channel support
427 
428  uint8_t* _data; // Holds LED color values
429  size_t _dmaBufferSize; // total size of _dmaBuffer
430  nrf_pwm_values_common_t* _dmaBuffer; // Holds pixel data in native format for PWM hardware
431 
432  void construct()
433  {
434  pinMode(_pin, OUTPUT);
435 
436  _data = static_cast<uint8_t*>(malloc(_sizeData));
437  // data cleared later in Begin()
438 
439  _dmaBufferSize = c_dmaBytesPerDataByte * _sizeData + sizeof(nrf_pwm_values_common_t);
440  _dmaBuffer = static_cast<nrf_pwm_values_common_t*>(malloc(_dmaBufferSize));
441  }
442 
443  void dmaInit()
444  {
445  // only use channel zero
446  _bus.Pwm()->PSEL.OUT[0] = digitalPinToPinName(_pin);
447  _bus.Pwm()->PSEL.OUT[1] = NC;
448  _bus.Pwm()->PSEL.OUT[2] = NC;
449  _bus.Pwm()->PSEL.OUT[3] = NC;
450 
451  _bus.Pwm()->ENABLE = 1;
452  _bus.Pwm()->MODE = NRF_PWM_MODE_UP;
453  _bus.Pwm()->PRESCALER = NRF_PWM_CLK_16MHz;
454  _bus.Pwm()->COUNTERTOP = T_SPEED::CountTop;
455  _bus.Pwm()->LOOP = 1; // single fire so events get set
456  _bus.Pwm()->DECODER = NRF_PWM_LOAD_COMMON;
457 
458  // sequence zero is the primary data with a BitReset entry on the end for
459  // the delay repeating
460  _bus.Pwm()->SEQ[0].PTR = reinterpret_cast<uint32_t>(_dmaBuffer);
461  _bus.Pwm()->SEQ[0].CNT = _dmaBufferSize / sizeof(nrf_pwm_values_common_t);
462  _bus.Pwm()->SEQ[0].REFRESH = 0; // ignored
463  _bus.Pwm()->SEQ[0].ENDDELAY = T_SPEED::CountReset; // ignored still?
464 
465  // sequence one is pointing to the BitReset entry at the end of the primary data
466  _bus.Pwm()->SEQ[1].PTR = reinterpret_cast<uint32_t>(_dmaBuffer + (_bus.Pwm()->SEQ[0].CNT - 1));
467  _bus.Pwm()->SEQ[1].CNT = 1;
468  _bus.Pwm()->SEQ[1].REFRESH = 0; // ignored
469  _bus.Pwm()->SEQ[1].ENDDELAY = 0; // ignored
470 
471  // stop when the loop finishes
472  _bus.Pwm()->SHORTS = PWM_SHORTS_LOOPSDONE_STOP_Msk;
473  _bus.Pwm()->INTEN = 0;
474 
475  dmaResetEvents();
476  }
477 
478  void dmaDeinit()
479  {
480  _bus.Pwm()->ENABLE = 0;
481  _bus.Pwm()->PSEL.OUT[0] = NC;
482  }
483 
484  void FillBuffer()
485  {
486  nrf_pwm_values_common_t* pDma = _dmaBuffer;
487  nrf_pwm_values_common_t* pDmaEnd = _dmaBuffer + (_dmaBufferSize / sizeof(nrf_pwm_values_common_t));
488  uint8_t* pEnd = _data + _sizeData;
489 
490  for (uint8_t* pData = _data; pData < pEnd; pData++)
491  {
492  uint8_t data = *pData;
493 
494  for (uint8_t bit = 0; bit < 8; bit++)
495  {
496  *(pDma++) = (data & 0x80) ? T_SPEED::Bit1 : T_SPEED::Bit0;
497  data <<= 1;
498  }
499  }
500 
501  // fill the rest with BitReset as it will get repeated when delaying or
502  // at the end before being stopped
503  while (pDma < pDmaEnd)
504  {
505  *(pDma++) = T_SPEED::BitReset;
506  }
507  }
508 
509  void dmaResetEvents()
510  {
511  _bus.Pwm()->EVENTS_LOOPSDONE = 0;
512  _bus.Pwm()->EVENTS_SEQEND[0] = 0;
513  _bus.Pwm()->EVENTS_SEQEND[1] = 0;
514  _bus.Pwm()->EVENTS_STOPPED = 0;
515  }
516 
517  void dmaStart()
518  {
519  dmaResetEvents();
520  _bus.Pwm()->TASKS_SEQSTART[0] = 1;
521  }
522 };
523 
524 // normal
525 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2811, NeoNrf52xPwmN> NeoNrf52xPwmNWs2811Method;
526 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwmN> NeoNrf52xPwmNWs2812xMethod;
527 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwmN> NeoNrf52xPwmNWs2816Method;
528 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwmN> NeoNrf52xPwmNSk6812Method;
529 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwmN> NeoNrf52xPwmNTm1814Method;
530 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwmN> NeoNrf52xPwmNTm1829Method;
531 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1914, NeoNrf52xPwmN> NeoNrf52xPwmNTm1914Method;
532 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwmN> NeoNrf52xPwmNTx1812Method;
533 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwmN> NeoNrf52xPwmNApa106Method;
534 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwmN> NeoNrf52xPwmN800KbpsMethod;
535 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed400Kbps, NeoNrf52xPwmN> NeoNrf52xPwmN400KbpsMethod;
536 
537 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2811, NeoNrf52xPwm0> NeoNrf52xPwm0Ws2811Method;
538 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm0> NeoNrf52xPwm0Ws2812xMethod;
539 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm0> NeoNrf52xPwm0Ws2816Method;
540 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwm0> NeoNrf52xPwm0Sk6812Method;
541 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1814Method;
542 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1829Method;
543 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1914, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1914Method;
544 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwm0> NeoNrf52xPwm0Tx1812Method;
545 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwm0> NeoNrf52xPwm0Apa106Method;
546 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwm0> NeoNrf52xPwm0800KbpsMethod;
547 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed400Kbps, NeoNrf52xPwm0> NeoNrf52xPwm0400KbpsMethod;
548 
549 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2811, NeoNrf52xPwm1> NeoNrf52xPwm1Ws2811Method;
550 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm1> NeoNrf52xPwm1Ws2812xMethod;
551 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm1> NeoNrf52xPwm1Ws2816Method;
552 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwm1> NeoNrf52xPwm1Sk6812Method;
553 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1814Method;
554 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1829Method;
555 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1914, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1914Method;
556 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwm1> NeoNrf52xPwm1Tx1812Method;
557 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwm1> NeoNrf52xPwm1Apa106Method;
558 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwm1> NeoNrf52xPwm1800KbpsMethod;
559 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed400Kbps, NeoNrf52xPwm1> NeoNrf52xPwm1400KbpsMethod;
560 
561 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2811, NeoNrf52xPwm2> NeoNrf52xPwm2Ws2811Method;
562 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm2> NeoNrf52xPwm2Ws2812xMethod;
563 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm2> NeoNrf52xPwm2Ws2816Method;
564 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwm2> NeoNrf52xPwm2Sk6812Method;
565 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1814Method;
566 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1829Method;
567 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1914, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1914Method;
568 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwm2> NeoNrf52xPwm2Tx1812Method;
569 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwm2> NeoNrf52xPwm2Apa106Method;
570 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwm2> NeoNrf52xPwm2800KbpsMethod;
571 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed400Kbps, NeoNrf52xPwm2> NeoNrf52xPwm2400KbpsMethod;
572 
573 #if defined(NRF_PWM3)
574 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2811, NeoNrf52xPwm3> NeoNrf52xPwm3Ws2811Method;
575 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm3> NeoNrf52xPwm3Ws2812xMethod;
576 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm3> NeoNrf52xPwm3Ws2816Method;
577 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwm3> NeoNrf52xPwm3Sk6812Method;
578 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1814Method;
579 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1829Method;
580 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1914, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1914Method;
581 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwm3> NeoNrf52xPwm3Tx1812Method;
582 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwm3> NeoNrf52xPwm3Apa106Method;
583 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwm3> NeoNrf52xPwm3800KbpsMethod;
584 typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed400Kbps, NeoNrf52xPwm3> NeoNrf52xPwm3400KbpsMethod;
585 #endif
586 
587 // inverted
588 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2811, NeoNrf52xPwmN> NeoNrf52xPwmNWs2811InvertedMethod;
589 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwmN> NeoNrf52xPwmNWs2812xInvertedMethod;
590 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwmN> NeoNrf52xPwmNWs2816InvertedMethod;
591 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwmN> NeoNrf52xPwmNSk6812InvertedMethod;
592 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwmN> NeoNrf52xPwmNTm1814InvertedMethod;
593 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwmN> NeoNrf52xPwmNTm1829InvertedMethod;
594 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1914, NeoNrf52xPwmN> NeoNrf52xPwmNTm1914InvertedMethod;
595 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwmN> NeoNrf52xPwmNTx1812InvertedMethod;
596 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwmN> NeoNrf52xPwmNApa106InvertedMethod;
597 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwmN> NeoNrf52xPwmN800KbpsInvertedMethod;
598 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed400Kbps, NeoNrf52xPwmN> NeoNrf52xPwmN400KbpsInvertedMethod;
599 
600 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2811, NeoNrf52xPwm0> NeoNrf52xPwm0Ws2811InvertedMethod;
601 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm0> NeoNrf52xPwm0Ws2812xInvertedMethod;
602 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm0> NeoNrf52xPwm0Ws2816InvertedMethod;
603 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwm0> NeoNrf52xPwm0Sk6812InvertedMethod;
604 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1814InvertedMethod;
605 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1829InvertedMethod;
606 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1914, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1914InvertedMethod;
607 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwm0> NeoNrf52xPwm0Tx1812InvertedMethod;
608 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwm0> NeoNrf52xPwm0Apa106InvertedMethod;
609 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwm0> NeoNrf52xPwm0800KbpsInvertedMethod;
610 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed400Kbps, NeoNrf52xPwm0> NeoNrf52xPwm0400KbpsInvertedMethod;
611 
612 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2811, NeoNrf52xPwm1> NeoNrf52xPwm1Ws2811InvertedMethod;
613 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm1> NeoNrf52xPwm1Ws2812xInvertedMethod;
614 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm1> NeoNrf52xPwm1Ws2816InvertedMethod;
615 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwm1> NeoNrf52xPwm1Sk6812InvertedMethod;
616 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1814InvertedMethod;
617 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1829InvertedMethod;
618 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1914, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1914InvertedMethod;
619 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwm1> NeoNrf52xPwm1Tx1812InvertedMethod;
620 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwm1> NeoNrf52xPwm1Apa106InvertedMethod;
621 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwm1> NeoNrf52xPwm1800KbpsInvertedMethod;
622 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed400Kbps, NeoNrf52xPwm1> NeoNrf52xPwm1400KbpsInvertedMethod;
623 
624 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2811, NeoNrf52xPwm2> NeoNrf52xPwm2Ws2811InvertedMethod;
625 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm2> NeoNrf52xPwm2Ws2812xInvertedMethod;
626 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm2> NeoNrf52xPwm2Ws2816InvertedMethod;
627 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwm2> NeoNrf52xPwm2Sk6812InvertedMethod;
628 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1814InvertedMethod;
629 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1829InvertedMethod;
630 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1914, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1914InvertedMethod;
631 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwm2> NeoNrf52xPwm2Tx1812InvertedMethod;
632 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwm2> NeoNrf52xPwm2Apa106InvertedMethod;
633 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwm2> NeoNrf52xPwm2800KbpsInvertedMethod;
634 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed400Kbps, NeoNrf52xPwm2> NeoNrf52xPwm2400KbpsInvertedMethod;
635 
636 #if defined(NRF_PWM3)
637 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2811, NeoNrf52xPwm3> NeoNrf52xPwm3Ws2811InvertedMethod;
638 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm3> NeoNrf52xPwm3Ws2812xInvertedMethod;
639 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm3> NeoNrf52xPwm3Ws2816InvertedMethod;
640 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwm3> NeoNrf52xPwm3Sk6812InvertedMethod;
641 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1814InvertedMethod;
642 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1829InvertedMethod;
643 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1914, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1914InvertedMethod;
644 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwm3> NeoNrf52xPwm3Tx1812InvertedMethod;
645 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwm3> NeoNrf52xPwm3Apa106InvertedMethod;
646 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwm3> NeoNrf52xPwm3800KbpsInvertedMethod;
647 typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed400Kbps, NeoNrf52xPwm3> NeoNrf52xPwm3400KbpsInvertedMethod;
648 #endif
649 
650 // defaults
651 typedef NeoNrf52xPwm2Ws2812xMethod NeoWs2813Method;
652 typedef NeoNrf52xPwm2Ws2812xMethod NeoWs2812xMethod;
653 typedef NeoNrf52xPwm2800KbpsMethod NeoWs2812Method;
654 typedef NeoNrf52xPwm2Ws2812xMethod NeoWs2811Method;
655 typedef NeoNrf52xPwm2Ws2812xMethod NeoWs2816Method;
656 typedef NeoNrf52xPwm2Sk6812Method NeoSk6812Method;
657 typedef NeoNrf52xPwm2Tm1814Method NeoTm1814Method;
658 typedef NeoNrf52xPwm2Tm1829Method NeoTm1829Method;
659 typedef NeoNrf52xPwm2Tm1914Method NeoTm1914Method;
660 typedef NeoNrf52xPwm2Tx1812Method NeoTx1812Method;
661 typedef NeoNrf52xPwm2Sk6812Method NeoLc8812Method;
662 typedef NeoNrf52xPwm2Apa106Method NeoApa106Method;
663 
664 typedef NeoNrf52xPwm2Ws2812xMethod Neo800KbpsMethod;
665 typedef NeoNrf52xPwm2400KbpsMethod Neo400KbpsMethod;
666 
667 typedef NeoNrf52xPwm2Ws2812xInvertedMethod NeoWs2813InvertedMethod;
668 typedef NeoNrf52xPwm2Ws2812xInvertedMethod NeoWs2812xInvertedMethod;
669 typedef NeoNrf52xPwm2Ws2812xInvertedMethod NeoWs2811InvertedMethod;
670 typedef NeoNrf52xPwm2800KbpsInvertedMethod NeoWs2812InvertedMethod;
671 typedef NeoNrf52xPwm2Ws2812xInvertedMethod NeoWs2816InvertedMethod;
672 typedef NeoNrf52xPwm2Sk6812InvertedMethod NeoSk6812InvertedMethod;
673 typedef NeoNrf52xPwm2Tm1814InvertedMethod NeoTm1814InvertedMethod;
674 typedef NeoNrf52xPwm2Tm1829InvertedMethod NeoTm1829InvertedMethod;
675 typedef NeoNrf52xPwm2Tm1914InvertedMethod NeoTm1914InvertedMethod;
676 typedef NeoNrf52xPwm2Tx1812InvertedMethod NeoTx1812InvertedMethod;
677 typedef NeoNrf52xPwm2Sk6812InvertedMethod NeoLc8812InvertedMethod;
678 typedef NeoNrf52xPwm2Apa106InvertedMethod NeoApa106InvertedMethod;
679 
680 typedef NeoNrf52xPwm2Ws2812xInvertedMethod Neo800KbpsInvertedMethod;
681 typedef NeoNrf52xPwm2400KbpsInvertedMethod Neo400KbpsInvertedMethod;
682 
683 #endif
NeoBusChannel
Definition: NeoBusChannel.h:12
Definition: NeoSettings.h:29