|
1 | 1 | # FastLED-idf & Patterns |
2 | 2 |
|
3 | | -# WARNING! Currently crashes immediately with more than one string of LEDs, issue #16 |
4 | | - |
5 | 3 | # TL;DR |
6 | 4 |
|
7 | 5 | This port of FastLED 3.3 runs under the 4.x ESP-IDF development environment. Enjoy. |
@@ -110,9 +108,7 @@ one which doesn't, and claims to be more efficient due to when it's converting |
110 | 108 | between LED RGB and not. |
111 | 109 |
|
112 | 110 | Whether you can use the "direct" mode or not depends on whether you have other |
113 | | -users of the RMT driver within ESP-IDF - however, *using the ESP-IDF supplied driver is |
114 | | -not currently working or supported*. I've grown tired of trying to figure out the |
115 | | -differences of the different versions. |
| 111 | +users of the RMT driver within ESP-IDF. |
116 | 112 |
|
117 | 113 | Essentially, if you have the Driver turned on, you shouldn't use the direct mode, |
118 | 114 | and if you want to use the direct mode, you should turn off the driver. |
@@ -246,6 +242,12 @@ I did. |
246 | 242 |
|
247 | 243 | https://github.com/samguyer/FastLED |
248 | 244 |
|
| 245 | +## TODO: use the `rmt_translator_init` function |
| 246 | + |
| 247 | +There is no reason to have ones own ISR. The ESP-IDF system has a 'translator', which |
| 248 | +is a function which will take pixel bytes to RMT buffers. This is the structure of the |
| 249 | +code already, so the entire ISR can be removed. This functionality is not in the Arduino |
| 250 | +implementation of RMT, which is why its not used here yet. |
249 | 251 |
|
250 | 252 | # Updating |
251 | 253 |
|
@@ -454,8 +456,6 @@ Note: what's up with registering the driver? I should, right? Make sure that's d |
454 | 456 | menuconfig? Doen't seem to be. There are no settings anywhere in the menuconfig regarding |
455 | 457 | gpio. Should probably look at the examples to see if I have to enable the ISR or something. |
456 | 458 |
|
457 | | - |
458 | | - |
459 | 459 | ## using RMT vs I2S |
460 | 460 |
|
461 | 461 | Note to self: There is a define in the platforms area that lets a person choose. |
@@ -537,6 +537,23 @@ and used the -O2 compile option, I got instability. When I switched to using the |
537 | 537 | constructure, which seems the same to me generally, I get a stable build. I |
538 | 538 | now wonder if this was some of the issue around not using the IRQ.... |
539 | 539 |
|
| 540 | +## issues regarding ESP-IDF 4.1 and private interrupt handler |
| 541 | + |
| 542 | +The underlying RMT code in ESP-IDF changed fairly radically between 4.0, 4.1, 4.2, and further. |
| 543 | +Specifically, the 4.1 code introduces the rmt_ll layer, but also initializes |
| 544 | +the structures used by `_set_tx_thr_intr_en` to set values in the chip only |
| 545 | +when the ESP-IDF interrupt handler is registered. This is resolved in 4.2, but |
| 546 | +in order to support 4.0, 4.1, and 4.2, I've put shadow versions of those functions. |
| 547 | +There are only three, so it's not a big deal. |
| 548 | + |
| 549 | +## using mRMT_channel |
| 550 | + |
| 551 | +The definition of the RMT system states that if you're using a buffer size of greater |
| 552 | +than 1 MEM_BLOCK, one must not use all the RMT channels. Thus, unlike other similar code |
| 553 | +in other systems, there are 8 channels and 8 rmt channels, but because we support MEM_BLOCK, |
| 554 | +the number of channels is limited by the MEM_BLOCKs, and it's important to use mRMT_channel, |
| 555 | +which is the underlying RMT channel in every case. |
| 556 | + |
540 | 557 | ## message about no hardware SPI pins defined |
541 | 558 |
|
542 | 559 | It's true! There are no hardware SPI pins defined. SPI is used for 4-wire LEDs, where |
|
0 commit comments