esp32/esp32_rmt: Call rmt_driver_install before rmt_config.

Otherwise the RMT will repeat pulses when using loop(True).  This repeating
is due to a bug in the IDF which will be fixed in an upcoming release, but
for now the accepted workaround is to swap these calls, which should still
work in the fixed version of the IDF.

Fixes issue #6167.
v1.13-wasp-os
Jonathan Hogg 2020-06-18 12:44:54 +01:00 committed by Damien George
parent 77ed6f69ac
commit 3a9d948032
1 changed files with 1 additions and 1 deletions

View File

@ -110,8 +110,8 @@ STATIC mp_obj_t esp32_rmt_make_new(const mp_obj_type_t *type, size_t n_args, siz
config.clk_div = self->clock_div;
check_esp_err(rmt_config(&config));
check_esp_err(rmt_driver_install(config.channel, 0, 0));
check_esp_err(rmt_config(&config));
return MP_OBJ_FROM_PTR(self);
}