esp32/esp32_rmt: Clear config struct before filling it out.

Or unset entries will have garbage in them.

Signed-off-by: mishafarms <github@mishafarms.us>
This commit is contained in:
mishafarms 2021-05-04 10:50:20 -07:00 committed by Damien George
parent 64aebed70e
commit 8ff3520f67
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ STATIC mp_obj_t esp32_rmt_make_new(const mp_obj_type_t *type, size_t n_args, siz
self->carrier_freq = carrier_freq;
self->loop_en = false;
rmt_config_t config;
rmt_config_t config = {0};
config.rmt_mode = RMT_MODE_TX;
config.channel = (rmt_channel_t)self->channel_id;
config.gpio_num = self->pin;