diff options
| author | Elvis Pfutzenreuter <epxx@epxx.co> | 2024-11-22 20:38:58 -0300 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-11-17 10:45:19 +1100 |
| commit | 2a3b9b0b4bed6ea51f1053e224278e9dbb266c35 (patch) | |
| tree | 7f87b28423868f94b5960202add77af51b8614d0 /ports/esp32/modesp32.h | |
| parent | 27544a2d81da5b0d804a932d98d680f121a22b8f (diff) | |
esp32/esp32_rmt: Update RMT module to use the new RMT API.HEADorigin/masterorigin/HEADmaster
The current `esp32.RMT` class uses a legacy API from ESP-IDF 4.x. The
ESP-IDF 5.x offers a new API, which is overall better, and easier to
implement the RX side in the future. This commit updates the module and
the documentation, preserving the current MicroPython RMT API as much as
possible.
The bitstream RMT implementation was updated as well, since ESP-IDF does
not allow firmware to reference legacy and new APIs at the same time (it
resets right after boot with an error message, even if neither module is
imported).
The documentation is updated accordingly.
Signed-off-by: Elvis Pfutzenreuter <elvis.pfutzenreuter@gmail.com>
Diffstat (limited to 'ports/esp32/modesp32.h')
| -rw-r--r-- | ports/esp32/modesp32.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ports/esp32/modesp32.h b/ports/esp32/modesp32.h index 81ab94dc6..60c386565 100644 --- a/ports/esp32/modesp32.h +++ b/ports/esp32/modesp32.h @@ -1,6 +1,8 @@ #ifndef MICROPY_INCLUDED_ESP32_MODESP32_H #define MICROPY_INCLUDED_ESP32_MODESP32_H +#include "driver/rmt_tx.h" + #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 #define RTC_VALID_EXT_PINS \ @@ -59,7 +61,7 @@ #define RTC_IS_VALID_EXT_PIN(pin_id) ((1ll << (pin_id)) & RTC_VALID_EXT_PINS) -extern int8_t esp32_rmt_bitstream_channel_id; +extern bool esp32_rmt_bitstream_enabled; extern const mp_obj_type_t esp32_nvs_type; extern const mp_obj_type_t esp32_partition_type; @@ -72,6 +74,4 @@ extern const mp_obj_type_t esp32_pcnt_type; void esp32_pcnt_deinit_all(void); #endif -esp_err_t rmt_driver_install_core1(uint8_t channel_id); - #endif // MICROPY_INCLUDED_ESP32_MODESP32_H |
