Browse Source

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>
pull/7243/head
mishafarms 4 years ago
committed by Damien George
parent
commit
8ff3520f67
  1. 2
      ports/esp32/esp32_rmt.c

2
ports/esp32/esp32_rmt.c

@ -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…
Cancel
Save