driver/temp_sensor/thermistor_ncp15wb.c: Format with clang-format
BRANCH=none
TEST=none
@@ -46,7 +46,8 @@ static const uint8_t adc_result[] = {
* to 50C, the temperature curve is roughly linear, so we don't need to include
* data points in our table.
*/
-#define adc_to_temp(result) (ADC_DISCREET_RANGE_START_TEMP - \
+#define adc_to_temp(result) \
+ (ADC_DISCREET_RANGE_START_TEMP - \
(((result)-ADC_DISCREET_RANGE_START_RESULT) * 3 + 16) / 32)
/* Convert ADC result (10 bit) to temperature in celsius */
@@ -72,8 +73,7 @@ int ncp15wb_calculate_temp(uint16_t adc)
tail = ARRAY_SIZE(adc_result) - 1;
while (head != tail) {
mid = (head + tail) / 2;
- if (adc_result[mid] >= adc &&
- adc_result[mid+1] < adc)
+ if (adc_result[mid] >= adc && adc_result[mid + 1] < adc)
break;
if (adc_result[mid] > adc)
head = mid + 1;
@@ -85,7 +85,9 @@ int ncp15wb_calculate_temp(uint16_t adc)
if (head != tail) {
delta = adc_result[mid] - adc_result[mid + 1];
step = ((adc_result[mid] - adc) *
- ADC_DISCREET_RANGE_STEP + delta / 2) / delta;
+ ADC_DISCREET_RANGE_STEP +
+ delta / 2) /
+ delta;
} else {
/* Edge case where adc = max */
mid = head;
