/* Scale and compensate the raw temperature measurement value to micro °C The formula is based on the Chapter 4.9.2 in the datasheet and was modified to need only integer arithmetic.  */
static void dps310_scale_temperature(const struct device *dev, int32_t tmp_raw)
/* Scale and compensate the raw temperature measurement value to micro °C The formula is based on the Chapter 4.9.2 in the datasheet and was modified to need only integer arithmetic.  */
static void dps310_scale_temperature(const struct device *dev, int32_t tmp_raw)
{
	struct dps310_data *data = dev->data;
	const struct dps310_cal_coeff *comp = &data->comp;
	int32_t tmp_p0 = (1000000 / 2) * comp->c0;
	int32_t tmp_p1 =
		(((int64_t)1000000) * comp->c1 * tmp_raw) / IFX_DPS310_SF_TMP;
	int32_t tmp_final = tmp_p0 + tmp_p1;
	data->tmp_val1 = tmp_final / 1000000;
	data->tmp_val2 = tmp_final % 1000000;
}