“eb6c329ebb26631aaa5eb7151f1a55530b67dd96”上不存在“doc/Compile_CN.md”
未验证 提交 55e1d377 编写于 作者: O openharmony_ci 提交者: Gitee

!20122 docs:modfiy light、sensor and vibrator delvelop guide

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