提交 d3c77d90 编写于 作者: mysterywolf's avatar mysterywolf 提交者: mysterywolf

[sensor] set power and accuracy as the hightest level

上级 40a24806
...@@ -493,5 +493,10 @@ int rt_hw_sensor_register(rt_sensor_t sensor, ...@@ -493,5 +493,10 @@ int rt_hw_sensor_register(rt_sensor_t sensor,
LOG_I("sensor[%s] init success", device_name); LOG_I("sensor[%s] init success", device_name);
rt_free(device_name); rt_free(device_name);
/* set sensor accuracy and power as the hightest */
rt_device_control(device, RT_SENSOR_CTRL_SET_ACCURACY_MODE, RT_SENSOR_MODE_ACCURACY_HIGHEST);
rt_device_control(device, RT_SENSOR_CTRL_SET_POWER_MODE, RT_SENSOR_MODE_POWER_HIGHEST);
return RT_EOK; return RT_EOK;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册