Skip to content

Commit ba32cc3

Browse files
committed
Fix issue with multiple channels. Hadn't propigated use of mRMT_channels into the IRQ handler.
1 parent e63619e commit ba32cc3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

components/FastLED-idf/platforms/esp/32/clockless_rmt_esp32.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,10 @@ void IRAM_ATTR ESP32RMTController::interruptHandler(void *arg)
527527
ESP32RMTController * pController = gOnChannel[channel];
528528
if (pController != NULL) {
529529

530-
int tx_done_bit = channel * 3;
531-
int tx_next_bit = channel + 24;
530+
int rmt_channel = pController->mRMT_channel;
531+
532+
int tx_done_bit = rmt_channel * 3;
533+
int tx_next_bit = rmt_channel + 24;
532534

533535
if (intr_st & BIT(tx_next_bit)) {
534536
// -- More to send on this channel
@@ -544,7 +546,7 @@ void IRAM_ATTR ESP32RMTController::interruptHandler(void *arg)
544546
else if (intr_st & BIT(tx_done_bit)) {
545547

546548
RMT.int_clr.val |= BIT(tx_done_bit);
547-
doneOnChannel(rmt_channel_t(channel), 0);
549+
doneOnChannel(rmt_channel_t(rmt_channel), 0);
548550

549551
}
550552
}

0 commit comments

Comments
 (0)