diff options
| author | IcedRooibos <47491349+IcedRooibos@users.noreply.github.com> | 2023-04-13 21:28:48 +0800 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-04-26 12:32:13 +1000 |
| commit | 7ea06a3e2638e0fb82240c0b88c9cd1ecaf942f5 (patch) | |
| tree | 80f3d263a0757b7897e06a45be29b4b8ce760706 | |
| parent | 67fb0beddb4e05b3126635143eefb41a599d9460 (diff) | |
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>
| -rw-r--r-- | ports/esp32/esp32_rmt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/esp32/esp32_rmt.c b/ports/esp32/esp32_rmt.c index 78c8c8ace..3cd43e847 100644 --- a/ports/esp32/esp32_rmt.c +++ b/ports/esp32/esp32_rmt.c @@ -326,13 +326,13 @@ STATIC mp_obj_t esp32_rmt_write_pulses(size_t n_args, const mp_obj_t *args) { check_esp_err(rmt_wait_tx_done(self->channel_id, portMAX_DELAY)); } - check_esp_err(rmt_write_items(self->channel_id, self->items, num_items, false)); - if (self->loop_en) { check_esp_err(rmt_set_tx_intr_en(self->channel_id, false)); check_esp_err(rmt_set_tx_loop_mode(self->channel_id, true)); } + check_esp_err(rmt_write_items(self->channel_id, self->items, num_items, false)); + return mp_const_none; } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(esp32_rmt_write_pulses_obj, 2, 3, esp32_rmt_write_pulses); |
