From d685fdf54a2cfbae32fa98eaf6b11ec1111e2912 Mon Sep 17 00:00:00 2001 From: MFlasskamp Date: Tue, 10 May 2022 07:16:16 +0200 Subject: [PATCH] mask deprecated adc_gpio_init() for esp32-s2 (#3445) --- esphome/components/adc/adc_sensor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/adc/adc_sensor.cpp b/esphome/components/adc/adc_sensor.cpp index ad9cf29b6f..ca87c8d11f 100644 --- a/esphome/components/adc/adc_sensor.cpp +++ b/esphome/components/adc/adc_sensor.cpp @@ -51,8 +51,8 @@ void ADCSensor::setup() { } } - // adc_gpio_init doesn't exist on ESP32-C3 or ESP32-H2 -#if !defined(USE_ESP32_VARIANT_ESP32C3) && !defined(USE_ESP32_VARIANT_ESP32H2) + // adc_gpio_init doesn't exist on ESP32-S2, ESP32-C3 or ESP32-H2 +#if !defined(USE_ESP32_VARIANT_ESP32C3) && !defined(USE_ESP32_VARIANT_ESP32H2) && !defined(USE_ESP32_VARIANT_ESP32S2) adc_gpio_init(ADC_UNIT_1, (adc_channel_t) channel_); #endif #endif // USE_ESP32