Update temp_sensor.rst documentation to match example (GitHub PR)

This commit is contained in:
BOT
2024-03-06 10:11:40 +08:00
committed by C.S.M
parent 64d37664b4
commit c07862cee8
3 changed files with 9 additions and 11 deletions
@@ -75,11 +75,8 @@ Creating a Temperature Sensor Handle
.. code:: c
temperature_sensor_handle_t temp_handle = NULL;
temperature_sensor_config_t temp_sensor = {
.range_min = 20,
.range_max = 50,
};
ESP_ERROR_CHECK(temperature_sensor_install(&temp_sensor, &temp_handle));
temperature_sensor_config_t temp_sensor_config = TEMPERATURE_SENSOR_CONFIG_DEFAULT(20, 50);
ESP_ERROR_CHECK(temperature_sensor_install(&temp_sensor_config, &temp_handle));
.. _temp-enable-and-disable-temperature-sensor: