Skip to content

Commit

Permalink
drivers: adc: esp32: adc2 init code calibration
Browse files Browse the repository at this point in the history
Add call to adc2_init_code_calibration during adc initialization on esp32s2
and esp32c3

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
  • Loading branch information
wmrsouza committed Sep 26, 2024
1 parent 48d0f23 commit 1c6a205
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/adc/adc_esp32.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,12 @@ static int adc_esp32_init(const struct device *dev)

adc_hw_calibration(conf->unit);

#if CONFIG_SOC_SERIES_ESP32S2 || CONFIG_SOC_SERIES_ESP32C3
if (conf->unit == 1) {
adc2_init_code_calibration();
}
#endif /* CONFIG_SOC_SERIES_ESP32S2 || CONFIG_SOC_SERIES_ESP32C3 */

#if defined(CONFIG_ADC_ESP32_DMA)
if (!device_is_ready(conf->gpio_port)) {
LOG_ERR("gpio0 port not ready");
Expand Down

0 comments on commit 1c6a205

Please sign in to comment.