Skip to content

Commit 7ea06a3

Browse files
IcedRooibosdpgeorge
authored andcommitted
esp32/esp32_rmt: Fix looping behaviour for RMT on ESP32-S3.
The previous code worked on ESP32 but not ESP32-S3. All the IDF (v4.4.3) examples call rmt_set_tx_loop_mode before rmt_write_items, so make that change here. Signed-off-by: Damien George <damien@micropython.org>
1 parent 67fb0be commit 7ea06a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ports/esp32/esp32_rmt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,13 @@ STATIC mp_obj_t esp32_rmt_write_pulses(size_t n_args, const mp_obj_t *args) {
326326
check_esp_err(rmt_wait_tx_done(self->channel_id, portMAX_DELAY));
327327
}
328328

329-
check_esp_err(rmt_write_items(self->channel_id, self->items, num_items, false));
330-
331329
if (self->loop_en) {
332330
check_esp_err(rmt_set_tx_intr_en(self->channel_id, false));
333331
check_esp_err(rmt_set_tx_loop_mode(self->channel_id, true));
334332
}
335333

334+
check_esp_err(rmt_write_items(self->channel_id, self->items, num_items, false));
335+
336336
return mp_const_none;
337337
}
338338
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(esp32_rmt_write_pulses_obj, 2, 3, esp32_rmt_write_pulses);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy