adc_cali.h 709 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. // Internal header for calibration, don't use in app
  7. #include "sdkconfig.h"
  8. #include "esp_err.h"
  9. #include "hal/adc_hal.h"
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #if !CONFIG_IDF_TARGET_ESP32
  14. /**
  15. * @brief Calibrate the offset of ADC. (Based on the pre-stored efuse or actual calibration)
  16. *
  17. * @param adc_n ADC unit to calibrate
  18. * @param channel Target channel if really do calibration
  19. * @param atten Attenuation to use
  20. * @return Always ESP_OK
  21. */
  22. extern esp_err_t adc_cal_offset(adc_ll_num_t adc_n, adc_channel_t channel, adc_atten_t atten);
  23. #endif
  24. #ifdef __cplusplus
  25. }
  26. #endif