Function esp_idf_hal::sys::temperature_sensor_get_celsius
source ยท pub unsafe extern "C" fn temperature_sensor_get_celsius(
tsens: *mut temperature_sensor_obj_t,
out_celsius: *mut f32,
) -> i32
Expand description
@brief Read temperature sensor data that is converted to degrees Celsius. @note Should not be called from interrupt.
@param tsens The handle created by temperature_sensor_install()
.
@param out_celsius The measure output value.
@return
- ESP_OK Success
- ESP_ERR_INVALID_ARG invalid arguments
- ESP_ERR_INVALID_STATE Temperature sensor is not enabled yet.
- ESP_FAIL Parse the sensor data into ambient temperature failed (e.g. out of the range).