drivers/sensor/mpu6050/mpu6050.c
/* see "Temperature Measurement" section from register map description */
see "Temperature Measurement" section from register map description
see " Temperature Measurement " section from register map description
static inline void mpu6050_convert_temp(struct sensor_value *val,
					s16_t raw_val)
{
	val->val1 = raw_val / 340 + 36;
	val->val2 = ((s64_t)(raw_val % 340) * 1000000) / 340 + 530000;
	if (val->val2 < 0) {
		val->val1--;
		val->val2 += 1000000;
	} else if (val->val2 >= 1000000) {
		val->val1++;
		val->val2 -= 1000000;
	}
}
static inline void mpu6050_convert_temp ( struct sensor_value * val , s16_t raw_val ) { val -> val1 = raw_val / 340 + 36 ; val -> val2 = ( ( s64_t ) ( raw_val % 340 ) * 1000000 ) / 340 + 530000 ; if ( val -> val2 < 0 ) { val -> val1 -- ; val -> val2 += 1000000 ; } else if ( val -> val2 >= 1000000 ) { val -> val1 ++ ; val -> val2 -= 1000000 ; } }
see "Temperature Measurement" section from register map description
see " Temperature Measurement " section from register map description