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:
parent
64aebed70e
commit
8ff3520f67
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue