[sensor] change RT_SENSOR_FLAG_FIFO to RT_DEVICE_FLAG_FIFO_RX

This commit is contained in:
guozhanxin
2019-02-15 10:39:48 +08:00
parent 3d9c306454
commit fb9482d61b
3 changed files with 3 additions and 3 deletions

View File

@@ -179,7 +179,7 @@ static rt_err_t rt_sensor_open(rt_device_t dev, rt_uint16_t oflag)
rt_sensor_irq_init(sensor);
}
}
else if (oflag & RT_SENSOR_FLAG_FIFO && dev->flag & RT_SENSOR_FLAG_FIFO)
else if (oflag & RT_DEVICE_FLAG_FIFO_RX && dev->flag & RT_DEVICE_FLAG_FIFO_RX)
{
/* If fifo mode is supported, configure it to fifo mode */
if (sensor->ops->control(sensor, RT_SENSOR_CTRL_SET_MODE, (void *)RT_SENSOR_MODE_FIFO) == RT_EOK)