提交 fb9482d6 编写于 作者: G guozhanxin

[sensor] change RT_SENSOR_FLAG_FIFO to RT_DEVICE_FLAG_FIFO_RX

上级 3d9c3064
......@@ -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)
......
......@@ -25,7 +25,7 @@ extern "C" {
#endif
#define RT_PIN_NONE 0xFFFF /* RT PIN NONE */
#define RT_SENSOR_FLAG_FIFO 0x200 /* Flag to use when the sensor is open by fifo mode */
#define RT_DEVICE_FLAG_FIFO_RX 0x200 /* Flag to use when the sensor is open by fifo mode */
#define RT_SENSOR_MODULE_MAX (3) /* The maximum number of members of a sensor module */
......
......@@ -119,7 +119,7 @@ static void sensor_fifo(int argc, char **argv)
rt_device_set_rx_indicate(dev, rx_callback);
if (rt_device_open(dev, RT_SENSOR_FLAG_FIFO) != RT_EOK)
if (rt_device_open(dev, RT_DEVICE_FLAG_FIFO_RX) != RT_EOK)
{
LOG_E("open device failed!");
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册