sensors/bh1749nuc_uorb.c: don't wait for VALID flag in fetch interface
otherwise the sensor freezes when we read RBG and IR data one after another
This commit is contained in:
parent
9d768498ce
commit
147b5762f0
@ -221,10 +221,9 @@ static int bh1749nuc_fetch(FAR struct sensor_lowerhalf_s *lower,
|
|||||||
goto errout;
|
goto errout;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wait for data */
|
/* Get data without wait for VALID flag - otherwise the sensor freezes
|
||||||
|
* when we read RBG and IR data one after another
|
||||||
while (!(bh1749nuc_getreg8(dev, BH1749NUC_MODE_CONTROL2) &
|
*/
|
||||||
BH1749NUC_MODE_CONTROL2_VALID));
|
|
||||||
|
|
||||||
if (lower->type == SENSOR_TYPE_RGB)
|
if (lower->type == SENSOR_TYPE_RGB)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user