sensors/bmi270: Fix a bug sensor_time is truncated

Fix a bug that sensor_time resolution is lost by bit shift.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
This commit is contained in:
SPRESENSE
2025-07-09 09:35:48 +09:00
committed by Alin Jerpelea
parent 6ae3cc9082
commit be5c90716c
+4 -4
View File
@@ -141,12 +141,12 @@ static ssize_t bmi270_read(FAR struct file *filep, FAR char *buffer,
return 0;
}
/* Set sensor_time to the lower 24 bits of SENSORTIME. */
p->sensor_time = 0;
bmi270_getregs(priv, BMI270_DATA_8, (FAR uint8_t *)p, 15);
/* Adjust sensing time into 24 bit */
p->sensor_time >>= 8;
return len;
}