2021-05-23 19:50:04 -04:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
2020-12-22 23:29:57 -05:00
|
|
|
|
|
|
|
// Internal header for calibration, don't use in app
|
|
|
|
|
|
|
|
#include "sdkconfig.h"
|
|
|
|
#include "esp_err.h"
|
|
|
|
#include "hal/adc_hal.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !CONFIG_IDF_TARGET_ESP32
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Calibrate the offset of ADC. (Based on the pre-stored efuse or actual calibration)
|
|
|
|
*
|
|
|
|
* @param adc_n ADC unit to calibrate
|
|
|
|
* @param atten Attenuation to use
|
|
|
|
* @return Always ESP_OK
|
|
|
|
*/
|
2022-03-24 05:45:58 -04:00
|
|
|
extern esp_err_t adc_cal_offset(adc_unit_t adc_n, adc_atten_t atten);
|
2020-12-22 23:29:57 -05:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|