mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
fix(soc): Fix wrong efuse register on esp32c61
This commit is contained in:
@@ -155,18 +155,15 @@ static inline void temperature_sensor_ll_set_clk_div(uint8_t clk_div)
|
||||
/**
|
||||
* @brief Retrieve and calculate the temperature sensor calibration value.
|
||||
*
|
||||
* @param[out] tsens_cal Pointer to a float where the calculated calibration value will be stored.
|
||||
* The output is a signed floating-point value based on the efuse data.
|
||||
*
|
||||
* @return returns true to indicate successful retrieval. false for calibration failed.
|
||||
* @return Temperature calibration value.
|
||||
*/
|
||||
static inline bool temperature_sensor_ll_calib_get_tsens_val(float* tsens_cal)
|
||||
static inline int temperature_sensor_ll_load_calib_param(void)
|
||||
{
|
||||
uint32_t cal_temp = 0;
|
||||
cal_temp = EFUSE.rd_blk2_data2.temp_calib;
|
||||
// BIT(8) stands for sign: 1: negative, 0: positive
|
||||
*tsens_cal = ((cal_temp & BIT(8)) != 0)? -(uint8_t)cal_temp: (uint8_t)cal_temp;
|
||||
return true;
|
||||
int tsens_cal = ((cal_temp & BIT(8)) != 0)? -(uint8_t)cal_temp: (uint8_t)cal_temp;
|
||||
return tsens_cal;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user