Moddable-OpenSource / moddable

Tools for developers to create truly open IoT products using standard JavaScript on low cost microcontrollers.

Home Page:http://www.moddable.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESP32 io/analog module: adc_oneshot_unit_init_cfg_t structure not initialized

linfan68 opened this issue · comments

This code does not properly init the structure (to all zero), leads to random initialization failure:

adc_oneshot_unit_init_cfg_t unit_cfg;

Error message:

E (3505) esp_clk_tree: esp_clk_tree_src_get_freq_hz(21): unknown clk src
E (3509) adc_oneshot: adc_oneshot_new_unit(106): clock source not supported

needs to be:

adc_oneshot_unit_init_cfg_t unit_cfg = {};

Good catch. Thank you. I've applied your fix internally and it will propagate to this public repo in the near future.

This fix is now live. Thanks again.