sensors/adxl372_uorb: wait for data ready in thread
This commit is contained in:
parent
a34007b81f
commit
322551b13b
@ -493,6 +493,10 @@ static int adxl372_thread(int argc, FAR char **argv)
|
||||
|
||||
if (priv->enabled)
|
||||
{
|
||||
/* Wait for data ready */
|
||||
|
||||
while (!(adxl372_getreg8(priv, ADXL372_STATUS) & 0x01));
|
||||
|
||||
adxl372_getregs(priv, ADXL372_XDATA_H, (FAR uint8_t *)data, 6);
|
||||
|
||||
accel.timestamp = sensor_get_timestamp();
|
||||
|
Loading…
Reference in New Issue
Block a user