feat(tsens): Load ESP32-H4 temperature calibration from eFuse

The HAL stub always returned 0 (IDF-15117), so get_celsius() never applied the factory offset.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
C.S.M
2026-09-14 19:13:29 +08:00
parent 5c2781df5c
commit 25a86c4608

View File

@@ -279,7 +279,8 @@ static inline void temperature_sensor_ll_set_sample_rate(uint16_t rate)
*/
static inline int temperature_sensor_ll_load_calib_param(void)
{
return 0; // IDF-15117
uint32_t cal_temp = EFUSE.rd_mac_sys5.temp_calib;
return (cal_temp & BIT(9)) ? -(int)(cal_temp & ~BIT(9)) : (int)cal_temp;
}
/**