[components][drivers][sensor]暂时禁止使用sensorv2框架
sensor v2框架仍在开发中
This commit is contained in:
parent
f4c05e3cc3
commit
ff1bd3807c
|
@ -565,9 +565,9 @@ config RT_USING_SENSOR
|
|||
default n
|
||||
|
||||
if RT_USING_SENSOR
|
||||
config RT_USING_SENSOR_V2
|
||||
bool "Enable Sensor Framework v2"
|
||||
default n
|
||||
# config RT_USING_SENSOR_V2
|
||||
# bool "Enable Sensor Framework v2"
|
||||
# default n
|
||||
|
||||
config RT_USING_SENSOR_CMD
|
||||
bool "Using Sensor cmd"
|
||||
|
|
|
@ -238,7 +238,7 @@ struct rt_sensor_data
|
|||
|
||||
struct rt_sensor_ops
|
||||
{
|
||||
rt_size_t (*fetch_data)(struct rt_sensor_device *sensor, void *buf, rt_size_t len);
|
||||
rt_ssize_t (*fetch_data)(struct rt_sensor_device *sensor, void *buf, rt_size_t len);
|
||||
rt_err_t (*control)(struct rt_sensor_device *sensor, int cmd, void *arg);
|
||||
};
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ static rt_err_t rt_sensor_irq_init(rt_sensor_t sensor)
|
|||
|
||||
// local rt_sensor_ops
|
||||
|
||||
static rt_size_t local_fetch_data(struct rt_sensor_device *sensor, void *buf, rt_size_t len)
|
||||
static rt_ssize_t local_fetch_data(struct rt_sensor_device *sensor, void *buf, rt_size_t len)
|
||||
{
|
||||
LOG_D("Undefined fetch_data");
|
||||
return 0;
|
||||
|
@ -135,7 +135,7 @@ static rt_size_t local_fetch_data(struct rt_sensor_device *sensor, void *buf, rt
|
|||
static rt_err_t local_control(struct rt_sensor_device *sensor, int cmd, void *arg)
|
||||
{
|
||||
LOG_D("Undefined control");
|
||||
return RT_ERROR;
|
||||
return -RT_ERROR;
|
||||
}
|
||||
static struct rt_sensor_ops local_ops =
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue