From 13bc5feb0a787a10a09a63184d7273292fd4d9c7 Mon Sep 17 00:00:00 2001 From: William Ferguson Date: Mon, 1 Mar 2021 09:21:44 +1000 Subject: [PATCH] [cxx]: fixed extern "C" declarations * Moving #includes above #ifdef __cplusplus extern "C" { #endif So that we can compile with CPP. Signed-off-by: Jakob Hasse Merges https://github.com/espressif/esp-idf/pull/6634 --- components/driver/esp32s2/include/driver/touch_sensor.h | 4 ++-- components/esp_adc_cal/include/esp_adc_cal.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/driver/esp32s2/include/driver/touch_sensor.h b/components/driver/esp32s2/include/driver/touch_sensor.h index e2e4a86bdf..efb488ea5b 100644 --- a/components/driver/esp32s2/include/driver/touch_sensor.h +++ b/components/driver/esp32s2/include/driver/touch_sensor.h @@ -13,12 +13,12 @@ #pragma once +#include "driver/touch_sensor_common.h" + #ifdef __cplusplus extern "C" { #endif -#include "driver/touch_sensor_common.h" - /** * @brief Set touch sensor FSM start * @note Start FSM after the touch sensor FSM mode is set. diff --git a/components/esp_adc_cal/include/esp_adc_cal.h b/components/esp_adc_cal/include/esp_adc_cal.h index b7afb383f6..9adf28078d 100644 --- a/components/esp_adc_cal/include/esp_adc_cal.h +++ b/components/esp_adc_cal/include/esp_adc_cal.h @@ -15,14 +15,14 @@ #ifndef __ESP_ADC_CAL_H__ #define __ESP_ADC_CAL_H__ -#ifdef __cplusplus -extern "C" { -#endif - #include #include "esp_err.h" #include "driver/adc.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Type of calibration value used in characterization */