blob: ef3e792ab6d789262c2fa926071808f8623d91e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#pragma once
#include "esp_err.h"
// On-die temperature sensor (ESP32-P4 TSENS). Init once at boot; reads are
// cheap (~µs) and safe from any task. Note this is junction temperature —
// expect ~10-20°C above ambient under load; useful for trending and
// thermal-throttle debugging, not room temperature.
esp_err_t chip_temp_init(void);
// Degrees Celsius, or NAN if the sensor isn't initialized / read failed.
float chip_temp_read(void);
|