2022-07-08 05:33:19 -04:00
|
|
|
/*
|
2023-02-15 12:49:24 -05:00
|
|
|
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
2022-07-08 05:33:19 -04:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <esp_bit_defs.h>
|
|
|
|
#include "esp_efuse.h"
|
|
|
|
#include "esp_efuse_table.h"
|
|
|
|
|
|
|
|
int esp_efuse_rtc_calib_get_ver(void)
|
|
|
|
{
|
|
|
|
uint32_t result = 0;
|
|
|
|
esp_efuse_read_field_blob(ESP_EFUSE_BLK_VERSION_MAJOR, &result, ESP_EFUSE_BLK_VERSION_MAJOR[0]->bit_count); // IDF-5366
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t esp_efuse_rtc_calib_get_init_code(int version, uint32_t adc_unit, int atten)
|
|
|
|
{
|
2023-02-15 12:49:24 -05:00
|
|
|
// Currently calibration is not supported on ESP32-C6, IDF-5236
|
|
|
|
(void) version;
|
2022-07-08 05:33:19 -04:00
|
|
|
(void) adc_unit;
|
2023-02-15 12:49:24 -05:00
|
|
|
(void) atten;
|
|
|
|
return 0;
|
2022-07-08 05:33:19 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
esp_err_t esp_efuse_rtc_calib_get_cal_voltage(int version, int atten, uint32_t* out_digi, uint32_t* out_vol_mv)
|
|
|
|
{
|
2023-02-15 12:49:24 -05:00
|
|
|
// Currently calibration is not supported on ESP32-C6, IDF-5236
|
|
|
|
(void) version;
|
|
|
|
(void) atten;
|
|
|
|
(void) out_digi;
|
|
|
|
(void) out_vol_mv;
|
2022-07-08 05:33:19 -04:00
|
|
|
return ESP_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
esp_err_t esp_efuse_rtc_calib_get_tsens_val(float* tsens_cal)
|
|
|
|
{
|
2022-10-20 03:04:33 -04:00
|
|
|
// Currently calibration is not supported on ESP32-C6, IDF-5236
|
|
|
|
*tsens_cal = 0;
|
2022-07-08 05:33:19 -04:00
|
|
|
return ESP_OK;
|
|
|
|
}
|