提交 f449185b 编写于 作者: S sunxuejiao

modfiy light、sensor and vibrator delvelop guide

Signed-off-by: Nsunxuejiao <sunxuejiao8@huawei.com>
上级 fa0dc6dd
......@@ -107,7 +107,7 @@ Light驱动模型支持获取系统中所有灯的信息、动态配置闪烁模
3. 灯驱动代码实现路径为: drivers\hdf_core\framework\model\misc\light\driver\src\light_driver.c。
- 灯驱动驱动对应的HdfDriverEntry对象,其中,Driver Entry入口函数定义如下:
- 灯驱动对应的HdfDriverEntry对象,其中,Driver Entry入口函数定义如下:
```c
/* 注册灯入口数据结构体对象 */
......@@ -319,7 +319,7 @@ Light驱动模型支持获取系统中所有灯的信息、动态配置闪烁模
}
```
- 灯驱动的内部接口完成了灯类型获取、闪烁模式设置和停止的接口开发,并实现根据闪烁模式创建和销毁定时器。
- 灯驱动的内部接口完成了灯类型获取、闪烁模式设置和停止的接口开发,并支持根据闪烁模式创建和销毁定时器。
- GetAllLightInfo接口实现如下:
......@@ -874,7 +874,6 @@ Light驱动模型支持获取系统中所有灯的信息、动态配置闪烁模
module_out_path = module_output_path
sources = [ "light_test.cpp" ]
include_dirs = [
"//drivers/hdf_core/framework/include/platform",
"//drivers/peripheral/light/interfaces/include",
]
deps = [ "//drivers/peripheral/light/hal:hdi_light" ]
......
......@@ -76,7 +76,6 @@ Sensor驱动模型对外开放的API接口能力的具体实现请参考:
| int32_t SetOption(int32_t sensorId, uint32_t option) | 设置指定传感器量程,精度等可选配置。 |
| int32_t Register(int32_t groupId, RecordDataCallback cb) | 订阅者根据不同groupId注册传感器数据回调函数,系统会将获取到的传感器数据上报给订阅者。 |
| int32_t Unregister(int32_t groupId, RecordDataCallback cb) | 订阅者根据groupId和回调函数注销对应订阅者的传感器数据回调函数。 |
| int32_t ReadData(int32_t sensorId, struct SensorEvents *event); | 在小型系统上查询指定传感器的数据。 |
Sensor驱动模型对驱动开发者开放的功能接口,驱动开发者无需实现,直接使用,请参考:
......@@ -108,7 +107,7 @@ Sensor驱动模型要求驱动开发者实现的接口功能,请参考:
| int32_t SetBatch(int64_t samplingInterval, int64_t reportInterval) | 根据数据采样率和数据上报间隔,配置当前传感器设备的数据上报线程处理时间。 |
| int32_t SetMode(int32_t mode) | 配置当前传感器设备数据上报方式。 |
| int32_t SetOption(uint32_t option) | 根据可选配置、下发量程和精度等寄存器配置。 |
| void ReadSensorData(void) | 实现传感器的数据读取函数。 |
| void ReadSensorData(void) | 读取传感器数据。 |
接口实现参考[开发步骤](#开发步骤)章节。
......@@ -858,7 +857,6 @@ Sensor驱动模型要求驱动开发者实现的接口功能,请参考:
module_out_path = module_output_path
sources = [ "sensor_test.cpp" ]
include_dirs = [
"//drivers/hdf_core/framework/include/platform",
"//drivers/peripheral/sensor/interfaces/include",
]
deps = [ "//drivers/peripheral/sensor/hal:hdi_sensor" ]
......
......@@ -841,7 +841,6 @@ Vibrator驱动模型为上层马达硬件服务层提供稳定的马达控制能
module_out_path = module_output_path
sources = [ "vibrator_test.cpp" ]
include_dirs = [
"//drivers/hdf_core/framework/include/platform",
"//drivers/peripheral/vibrator/interfaces/include",
]
deps = [ "//drivers/peripheral/vibrator/hal:hdi_vibrator" ]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册