diff options
| author | mishafarms <github@mishafarms.us> | 2021-05-04 10:50:20 -0700 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-05-06 15:53:56 +1000 |
| commit | 8ff3520f67bb8f7e5509129f9f561a1217ababa4 (patch) | |
| tree | dea5e1623d533b20f721b694b803f461477e1913 /ports/esp32/esp32_rmt.c | |
| parent | 64aebed70e58ecc9623231d887d9818475174081 (diff) | |
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>
Diffstat (limited to 'ports/esp32/esp32_rmt.c')
| -rw-r--r-- | ports/esp32/esp32_rmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/esp32/esp32_rmt.c b/ports/esp32/esp32_rmt.c index b547af553..9619b1dd5 100644 --- a/ports/esp32/esp32_rmt.c +++ b/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; |
