zephyr/test/drivers/src/thermistor.c: Format with clang-format
BRANCH=none
TEST=none
#include "temp_sensor/temp_sensor.h"
#include "test/drivers/test_state.h"
-
#define GPIO_PG_EC_DSW_PWROK_PATH DT_PATH(named_gpios, pg_ec_dsw_pwrok)
#define GPIO_PG_EC_DSW_PWROK_PORT DT_GPIO_PIN(GPIO_PG_EC_DSW_PWROK_PATH, gpios)
@@ -57,8 +56,7 @@ ZTEST_USER(thermistor, test_thermistor_power_pin)
sensor_idx++) {
const struct temp_sensor_t *sensor = &temp_sensors[sensor_idx];
- zassert_ok(adc_emul_const_value_set(adc_dev,
- sensor->idx,
+ zassert_ok(adc_emul_const_value_set(adc_dev, sensor->idx,
A_VALID_VOLTAGE),
"adc_emul_value_func_set() failed on %s",
sensor->name);
@@ -188,8 +186,7 @@ static int adc_temperature_func(const struct device *dev, unsigned int channel,
{
struct thermistor_state *s = (struct thermistor_state *)param;
- *result = volt_divider(s->v,
- s->r,
+ *result = volt_divider(s->v, s->r,
resistance_47kohm_B4050(s->temp_expected));
return 0;
@@ -211,8 +208,7 @@ static void do_thermistor_test(const struct temp_sensor_t *temp_sensor,
zassert_not_null(adc_dev, "Cannot get ADC device");
/* Setup ADC channel */
- zassert_ok(adc_emul_value_func_set(adc_dev,
- temp_sensor->idx,
+ zassert_ok(adc_emul_value_func_set(adc_dev, temp_sensor->idx,
adc_temperature_func, &state),
"adc_emul_value_func_set() failed on %s", temp_sensor->name);
@@ -225,7 +221,8 @@ static void do_thermistor_test(const struct temp_sensor_t *temp_sensor,
for (temp_expected = 273; temp_expected <= 373; temp_expected++) {
state.temp_expected = temp_expected;
zassert_equal(EC_SUCCESS,
- temp_sensor->zephyr_info->read(temp_sensor, &temp),
+ temp_sensor->zephyr_info->read(temp_sensor,
+ &temp),
"failed on %s", temp_sensor->name);
zassert_within(temp_expected, temp, TEMP_EPS,
"Expected %d*K, got %d*K on %s", temp_expected,
