From bc225c8886a95dda3c8691dc00cd0cc955d5707c Mon Sep 17 00:00:00 2001 From: Jonas Vanthornhout Date: Mon, 31 Oct 2022 17:31:40 +0100 Subject: [PATCH] Fixed typo --- components/driver/include/driver/temperature_sensor.h | 2 +- .../temperature_sensor/main/test_temperature_sensor.c | 8 ++++---- examples/peripherals/temp_sensor/main/temp_sensor_main.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/driver/include/driver/temperature_sensor.h b/components/driver/include/driver/temperature_sensor.h index 9d1ff1a2d0..743a2fdc1a 100644 --- a/components/driver/include/driver/temperature_sensor.h +++ b/components/driver/include/driver/temperature_sensor.h @@ -34,7 +34,7 @@ typedef struct { /** * @brief temperature_sensor_config_t default constructure */ -#define TEMPERAUTRE_SENSOR_CONFIG_DEFAULT(min, max) \ +#define TEMPERATURE_SENSOR_CONFIG_DEFAULT(min, max) \ { \ .range_min = min, \ .range_max = max, \ diff --git a/components/driver/test_apps/temperature_sensor/main/test_temperature_sensor.c b/components/driver/test_apps/temperature_sensor/main/test_temperature_sensor.c index 191cc5f236..94d3969845 100644 --- a/components/driver/test_apps/temperature_sensor/main/test_temperature_sensor.c +++ b/components/driver/test_apps/temperature_sensor/main/test_temperature_sensor.c @@ -13,7 +13,7 @@ TEST_CASE("Temperature_sensor_driver_workflow_test", "[temperature_sensor]") { printf("Initializing Temperature sensor\n"); float tsens_out; - temperature_sensor_config_t temp_sensor = TEMPERAUTRE_SENSOR_CONFIG_DEFAULT(10, 50); + temperature_sensor_config_t temp_sensor = TEMPERATURE_SENSOR_CONFIG_DEFAULT(10, 50); temperature_sensor_handle_t temp_handle = NULL; TEST_ESP_OK(temperature_sensor_install(&temp_sensor, &temp_handle)); // read sensor before enable it should fail @@ -41,7 +41,7 @@ TEST_CASE("Temperature_sensor_driver_workflow_test", "[temperature_sensor]") TEST_CASE("Double install error cause test", "[temperature_sensor]") { printf("Initializing Temperature sensor\n"); - temperature_sensor_config_t temp_sensor = TEMPERAUTRE_SENSOR_CONFIG_DEFAULT(10, 50); + temperature_sensor_config_t temp_sensor = TEMPERATURE_SENSOR_CONFIG_DEFAULT(10, 50); temperature_sensor_handle_t temp_handle = NULL; TEST_ESP_OK(temperature_sensor_install(&temp_sensor, &temp_handle)); TEST_ESP_ERR(ESP_ERR_INVALID_STATE, temperature_sensor_install(&temp_sensor, &temp_handle)); @@ -51,7 +51,7 @@ TEST_CASE("Double install error cause test", "[temperature_sensor]") TEST_CASE("Double start error cause test", "[temperature_sensor]") { printf("Initializing Temperature sensor\n"); - temperature_sensor_config_t temp_sensor = TEMPERAUTRE_SENSOR_CONFIG_DEFAULT(10, 50); + temperature_sensor_config_t temp_sensor = TEMPERATURE_SENSOR_CONFIG_DEFAULT(10, 50); temperature_sensor_handle_t temp_handle = NULL; TEST_ESP_OK(temperature_sensor_install(&temp_sensor, &temp_handle)); TEST_ESP_OK(temperature_sensor_enable(temp_handle)); @@ -64,7 +64,7 @@ TEST_CASE("Double Start-Stop test", "[temperature_sensor]") { printf("Initializing Temperature sensor\n"); float tsens_out; - temperature_sensor_config_t temp_sensor = TEMPERAUTRE_SENSOR_CONFIG_DEFAULT(10, 50); + temperature_sensor_config_t temp_sensor = TEMPERATURE_SENSOR_CONFIG_DEFAULT(10, 50); temperature_sensor_handle_t temp_handle = NULL; TEST_ESP_OK(temperature_sensor_install(&temp_sensor, &temp_handle)); TEST_ESP_OK(temperature_sensor_enable(temp_handle)); diff --git a/examples/peripherals/temp_sensor/main/temp_sensor_main.c b/examples/peripherals/temp_sensor/main/temp_sensor_main.c index 7ac7f6e4f5..4129dcbef8 100644 --- a/examples/peripherals/temp_sensor/main/temp_sensor_main.c +++ b/examples/peripherals/temp_sensor/main/temp_sensor_main.c @@ -15,7 +15,7 @@ void app_main(void) { ESP_LOGI(TAG, "Install temperature sensor, expected temp ranger range: 10~50 ℃"); temperature_sensor_handle_t temp_sensor = NULL; - temperature_sensor_config_t temp_sensor_config = TEMPERAUTRE_SENSOR_CONFIG_DEFAULT(10, 50); + temperature_sensor_config_t temp_sensor_config = TEMPERATURE_SENSOR_CONFIG_DEFAULT(10, 50); ESP_ERROR_CHECK(temperature_sensor_install(&temp_sensor_config, &temp_sensor)); ESP_LOGI(TAG, "Enable temperature sensor");