1 /* 2 * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <esp_types.h> 8 #include <esp_err.h> 9 10 #ifdef __cplusplus 11 extern "C" { 12 #endif 13 14 /** 15 * @brief Get the RTC calibration efuse version 16 * 17 * @return Version of the stored efuse 18 */ 19 int esp_efuse_rtc_calib_get_ver(void); 20 21 /** 22 * @brief Get the init code in the efuse, for the corresponding attenuation. 23 * 24 * @param version Version of the stored efuse 25 * @param atten Attenuation of the init code 26 * @return The init code stored in efuse 27 */ 28 uint16_t esp_efuse_rtc_calib_get_init_code(int version, int atten); 29 30 /** 31 * @brief Get the calibration digits stored in the efuse, and the corresponding voltage. 32 * 33 * @param version Version of the stored efuse 34 * @param atten Attenuation to use 35 * @param out_digi Output buffer of the digits 36 * @param out_vol_mv Output of the voltage, in mV 37 * @return 38 * - ESP_ERR_INVALID_ARG: If efuse version or attenuation is invalid 39 * - ESP_OK: if success 40 */ 41 esp_err_t esp_efuse_rtc_calib_get_cal_voltage(int version, int atten, uint32_t* out_digi, uint32_t* out_vol_mv); 42 43 /** 44 * @brief Get the temperature sensor calibration number delta_T stored in the efuse. 45 * 46 * @param version Version of the stored efuse 47 * 48 * @return The specification of temperature sensor calibration number in efuse. 49 */ 50 float esp_efuse_rtc_calib_get_cal_temp(int version); 51 52 #ifdef __cplusplus 53 } 54 #endif 55