summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Blakeney <mark.blakeney@bullet-systems.net>2023-11-20 15:46:08 +1000
committerDamien George <damien@micropython.org>2023-11-23 12:21:28 +1100
commit094b52b8ad13be1e919354b188ad3dbe94fc4bf5 (patch)
treeaceff87c546961b5ec4259f6615a10dfaf4fd6f1
parentd6154925d5340e1fb3b2db073bd343da1154f163 (diff)
esp32/esp32_rmt: Fix RMT looping.
Commit 7ea06a3e2638e0fb82240c0b88c9cd1ecaf942f5 moved the `rmt_write_items()` call to fix RMT looping for ESP32-S3, but broke it for the other ESP32s. This commit conditionally compiles the location of that call. Signed-off-by: Mark Blakeney <mark.blakeney@bullet-systems.net>
-rw-r--r--ports/esp32/esp32_rmt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ports/esp32/esp32_rmt.c b/ports/esp32/esp32_rmt.c
index 5d53018f4..77a31ebc0 100644
--- a/ports/esp32/esp32_rmt.c
+++ b/ports/esp32/esp32_rmt.c
@@ -323,12 +323,18 @@ 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));
}
+ #if !CONFIG_IDF_TARGET_ESP32S3
+ check_esp_err(rmt_write_items(self->channel_id, self->items, num_items, false));
+ #endif
+
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));
}
+ #if CONFIG_IDF_TARGET_ESP32S3
check_esp_err(rmt_write_items(self->channel_id, self->items, num_items, false));
+ #endif
return mp_const_none;
}